Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

SSIS Package to Script All SQL Server Jobs to Individual Files Expand / Collapse
Author
Message
Posted Monday, February 7, 2011 11:22 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, November 20, 2014 2:23 PM
Points: 239, Visits: 376
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
Post #1059793
Posted Monday, February 7, 2011 1:05 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, November 21, 2014 12:28 PM
Points: 3,467, Visits: 1,828
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 Fisher
I 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
Post #1059872
Posted Monday, October 8, 2012 12:02 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, November 17, 2014 9:57 AM
Points: 323, Visits: 1,471
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

Ken
Post #1369978
Posted Monday, December 31, 2012 2:02 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, November 20, 2014 2:23 PM
Points: 239, Visits: 376
Your wish is my command. This should comment out the schedule_uid parts.

Thomas Lane, PhD
DBA
Edgenet / Big Hammer Data
SQL Lane


  Post Attachments 
ScriptJobs.zip (6 views, 14.09 KB)
Post #1401501
Posted Wednesday, June 18, 2014 6:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 6:45 PM
Points: 1, Visits: 2
Thanks for saving me a lot of time! It worked for me!
Post #1583488
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse