Red Gate forums :: View topic - Generate upgrade script at install-time
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Generate upgrade script at install-time

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
j



Joined: 12 Mar 2009
Posts: 5

PostPosted: Thu Mar 12, 2009 6:26 pm    Post subject: Generate upgrade script at install-time Reply with quote

Hi there,

I'm interested in using a product that allows me to specify a target schema (and minimum data requirements) as part of an installation.

At install time, if the database doesn't exist, it is created. I have figured out how redgate takes us that far.

BUT, If the database ALREADY exists, I'd like the installer to create a custom change script right then, specific to that existing database, for the changes necessary to ensure that the target schema is as it ought to be.

The installer should attempt to build the change script, show any warnings of incompatible constraints, data loss, etc.

As a bonus, the installer might be tolerant of additional schema objects present in the existing database and leave them be (optionally), as long as the objects don't conflict with the target schema and minimum data.

SQL Packager seems to have all of the necessary technology to do this, but I haven't found it as an option.

Is it possible with redgate tools? Is there a very good technical reason why it can't/shouldn't be done this way?

Thanks,

J
Back to top
View user's profile Send private message
simon.jackson



Joined: 08 Jan 2009
Posts: 45

PostPosted: Fri Mar 13, 2009 10:50 am    Post subject: Reply with quote

Thanks for your interest. We are aware that this is a limitation of SQL Packager, and it may be something we look at in the future. It might be worth pointing out that if you know the state of the remote database you can use Packager to create an upgrade script, but this is obviously not always appropriate.

It is, however, currently possible to solve this problem using Red Gate technology, if you're prepared to get your hands dirty and write some C#, VB or other .NET code. The relevant product is the SQL Comparison SDK, which gives you full API access to Red Gate comparison tools.

In particular if you look at the Compare API samples "LoadAndSaveASnapshot" and "SynchronizeDatabases" you should be able to ship a SQL Compare snapshot and use this to create an upgrade script at the customer site.

You can even leave additional objects in the target schema by unsetting the SessionSettings.IncludeRecordsInTwo option!

Hope that helps
Back to top
View user's profile Send private message
j



Joined: 12 Mar 2009
Posts: 5

PostPosted: Fri Mar 13, 2009 7:33 pm    Post subject: Reply with quote

Thank you for the response!

That is a very reasonable option. Which DLLs are redistributable under the SQL Compare license? How does licensing work for those distributed assemblies - is there an end user key distributed along with my software?

Thanks,

J
Back to top
View user's profile Send private message
j



Joined: 12 Mar 2009
Posts: 5

PostPosted: Fri Mar 13, 2009 7:40 pm    Post subject: Reply with quote

Nevermind, I found this information on your website. Thanks!
Back to top
View user's profile Send private message
luckystar09



Joined: 20 Aug 2009
Posts: 1

PostPosted: Thu Aug 20, 2009 11:05 am    Post subject: :D Reply with quote

Thanks for your posts. They are really very cool, very wonderful
script install
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group