Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Execute DTS package using OA procedures

By philcart,

This script will execute a DTS package using the sp_OA stored procedures. It accepts six parameters which specify the server name, security mode flag, userid, password, package name and optional package password.

Eg:
For SQL Security
EXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=0, @vcrUID='UserID', @vcrPWD='Password', @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'

For Windows Security
EXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=1, @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'

It uses a function called udf_varBinary2Hex, which is included. This is my conversion of the sp_hexadecimal procedure listed in the "OLE Automation Return Codes and Error Information" topic in books online.

Comment and questions welcome.

Phill

Total article views: 318 | Views in the last 30 days: 3
 
Related Articles
FORUM

Passwords

Storing passwords securely

FORUM

changing the connection password hrough another package

changing the connection password through another package

ARTICLE

Changing SQL Server Passwords

SQL Server 2000 does not have the best or most secure password mechanism. In fact it does a pretty p...

FORUM

Linked Server Security

Linked Server Security Question

FORUM

Forgot Sql server password

I forgot sql server password. How to reset password in sql server 2005.

 
Contribute