Red Gate forums :: View topic - scripting to master, msdb databases and the target database
Return to www.red-gate.com RSS Feed Available

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

scripting to master, msdb databases and the target database

Search in SQL Packager Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
djburns



Joined: 09 May 2008
Posts: 2

PostPosted: Fri May 09, 2008 4:41 pm    Post subject: scripting to master, msdb databases and the target database Reply with quote

Is it possible to include a script in the uncompressed resx package1 file that will create a procedure on the master database and then also script the remainder of the procedures and data to the intended new target database? Also i would like to append scripted scheduled jobs that are written to the msdb database. Can I achieve this by simply editing the package1.resx file with each line of the orphaned database statement and laboriously ammend the batch numbers of the data elements and re-total the batch numbers?

If this is possible i.e. using USE [master], USE [msdb] & GO statements to target these orphaned databases, does anyone know of a simple method of renumbering the Batch numbers?

Thanks
Back to top
View user's profile Send private message
djburns



Joined: 09 May 2008
Posts: 2

PostPosted: Fri May 16, 2008 8:56 am    Post subject: Reply with quote

Packager can see the master and msdb databases and my solution, however labourious, did work for me.

Simply edit Package1.resx and insert the statements at the correct points in the script batch files using the 'USE [Master]' statement before targeting the Master database and then once this has compeleted insert the 'USE [whatever_you've_called_your_database]' afterwards to carry on with your original script. Similarly to insert the scripted jobs I targeted the 'USE [msdb]' statement. The only point to make is that the 'GO' statement should never be used as this will break the operation.

The most painfully mind numbing part was then manually renumbering the Batch numbers in the package file. I seriously lost the will to live during this. If anyone knows a way to renumber the file by a script or any other methods then please let me know.
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