SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Package to Script All SQL Server Jobs to Individual Files


SSIS Package to Script All SQL Server Jobs to Individual Files

Author
Message
SQL Doc
SQL Doc
SSC Veteran
SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)

Group: General Forum Members
Points: 271 Visits: 429
For a sql server login I can not think of a way. The AcquireConnection method requires that the connection object have a connection string. Doing encryption is really not that hard try something like this
[url=http://www.databasejournal.com/scripts/article.php/1496441/Enhanced-RC4-EncryptionDecryption-Script.htm][/url]

Just name the function something weird.

Good luck

Thomas Lane, PhD
DBA
Edgenet / Big Hammer Data
SQL Lane
Kenneth Fisher
Kenneth Fisher
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6353 Visits: 2060
I did in fact just find a solution. It turns out the AcquireConnection method of a SMO connection is an SMO Server, so I was able to use the following code.


Dim src As Server
src = DirectCast(Dts.Connections("SMOSOURCE").AcquireConnection(Dts.Transaction), _
Server)



I have actually done some encryption with SQL Server and would probably have gone that way at need. I just prefer this way because I can let the connection manager handle everything, and it just seems more neatly handled this way.

Thanks
Kenneth

Kenneth FisherI strive to live in a world where a chicken can cross the road without being questioned about its motives.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/Link to my Blog Post --> www.SQLStudies.com
ken.trock
ken.trock
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1337 Visits: 1730
Tom, thanks for sharing this. Not sure what you did to prevent that annoying @schedule_uid from appearing in the new job (which would cause it not to compile) but I'm glad it's out.

This saved me some time when trying to script out 30 cloned jobs on a new machine. And now I have a backup of the jobs :-D

Ken
SQL Doc
SQL Doc
SSC Veteran
SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)SSC Veteran (271 reputation)

Group: General Forum Members
Points: 271 Visits: 429
Your wish is my command. This should comment out the schedule_uid parts.

Thomas Lane, PhD
DBA
Edgenet / Big Hammer Data
SQL Lane
Attachments
ScriptJobs.zip (24 views, 14.00 KB)
gkcajucom
gkcajucom
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 3
Thanks for saving me a lot of time! It worked for me!
andrewkane17
andrewkane17
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1825 Visits: 3266
Just what I needed, thanks.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search