scripting to master, msdb databases and the target database

Forum for users of SQL Packager database archive utility

Moderator: David Atkinson

scripting to master, msdb databases and the target database

Postby djburns » Fri May 09, 2008 4:41 pm

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
djburns
 
Posts: 2
Joined: Fri May 09, 2008 4:31 pm

Postby djburns » Fri May 16, 2008 8:56 am

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.
djburns
 
Posts: 2
Joined: Fri May 09, 2008 4:31 pm


Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests