Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using activeX script task

Status
Not open for further replies.

MDA

Technical User
Jan 16, 2001
243
US
Hi all,

I have a script that creates a text file from particular transactions in a database. My concern is that I am using a connection script that has the sa password in it. Is there anyway to use a connection outside the script that is encrypted??

My script starts like this:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()

Dim fso,fil,txtStr,conObj,rsRst

set conObj =CreateObject("ADODB.Connection")
set rsRst = CreateObject("ADODB.Recordset")
conObj.Connectionstring = "PROVIDER = SQLOLEDB;DATA SOURCE =TESTLA;INITIAL CATALOG = TEST;USER ID = sa; PASSWORD = sa"
conObj.open
------------------------------------------------

ANy ideas on how to avoid using the connection info like this?

Thanks in advance,

MDA
 
Create another user, and give it rights to the database. Don't use the SA user, and never use SA as ste password for SA because it's the easyest to figure out.
 
Thanks for the feedback...

The problem is that this is a financial DB so the data is sensitive. The security people don't like having open passwords available so having a password just for this db, would not do the trick. I was thinking there is some way to link to a UDL file for connection info..

This is actually on a deveopment box, so I set it to sa for ease... but thanks for the info...

Regards,
MDA
 
Been there. Not that I can find. Tell them that it is much better to create another user. Just give the new user the rights to run the dts package only, then that is all it can do.

 
Parameterize the values and pass them in via global variables. Then they can be stored in a db or ini file or excel spreadsheet, etc. you can even store them encypted and allow the script to decrypt them at run time.
 
I would not have thought of that. That's a great idea!
 
Thanks for all the feedback guys... I will check out both options...

Thanks again...

MDA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top