all groups > sql server dts > april 2007 >
You're in the

sql server dts

group:

Schedule a DTS Package with a Password



Schedule a DTS Package with a Password qjlee
4/10/2007 6:48:01 PM
sql server dts: Hi,

I have a DTS package that requires a password to run, e.g. the password is
test.
How can I schedule it to run automatically?

Thanks,

Re: Schedule a DTS Package with a Password Ã…dne Hovda
4/12/2007 12:00:00 AM
[quoted text, click to view]

I have written a small C# wrapper for this.

using Microsoft.SqlServer.Dts.Runtime;
private void runProgram()
{
Application dtsApp = new Application();
dtsApp.PackagePassword = "password";
Package xferPackage = dtsApp.LoadPackage("package.dtsx", null);
xferPackage.ImportConfigurationFile("packageconfig.dtsconfig");
DTSExecResult result = xferPackage.Execute();
Console.Write(result.ToString() + ".");
}

Schedule this program and you're done.

--
Re: Schedule a DTS Package with a Password Allan Mitchell
4/12/2007 7:14:29 PM
Hello qjlee,


What part of the DTS package requires a password? Is this "In" the package
or is this in order to execute the package ie a user password?

To run on a schedule I would use SQL Server Agent and DTSRun. DTSRun has
a great many switches that can help you here.

Let me know about the questions.


--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button