dbTalk Databases Forums  

Re: Retrieving Connection properties programatically

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Retrieving Connection properties programatically in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Retrieving Connection properties programatically - 06-25-2004 , 12:05 PM






Here is something very quick that will check for every SQL Server connection
if the connection is set to use a Trusted connection

Function Main()


dim cn

for each cn in DTSGlobalVariables.Parent.Connections
if cn.ProviderID = "SQLOLEDB" then
if cn.ConnectionProperties("Integrated Security").Value = "SSPI" then
' Do Something
End if
End if
next


Main = DTSTaskExecResult_Success
End Function


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Rev" <Rev (AT) discussions (DOT) microsoft.com> wrote

Quote:
I need to check whether a connection "istrusted" or not for 100's of DTS
packages on Multiple Servers. I have found MANY articles and examples on
how to create packages programatically, and even a few on retrieving
properties. The problem is the property I need is specific to the
connections in the task. Can anyone please help?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.