February 7, 2011 at 11:22 am
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
Just name the function something weird.
Good luck
Thomas Lane, PhD
DBA
Edgenet / Big Hammer Data
SQL Lane
February 7, 2011 at 1:05 pm
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 was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
October 8, 2012 at 12:02 pm
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
December 31, 2012 at 2:02 pm
Your wish is my command. This should comment out the schedule_uid parts.
Thomas Lane, PhD
DBA
Edgenet / Big Hammer Data
SQL Lane
June 18, 2014 at 6:23 pm
Thanks for saving me a lot of time! It worked for me!
August 29, 2015 at 9:43 am
Just what I needed, thanks.
Viewing 6 posts - 31 through 35 (of 35 total)
You must be logged in to reply to this topic. Login to reply