all groups > sql server dts > november 2004 >
You're in the

sql server dts

group:

Getting the Server and Database Name from the Command Line


Getting the Server and Database Name from the Command Line davidborgo NO[at]SPAM yahoo.com
11/18/2004 8:16:01 AM
sql server dts:
I am running a DTS project that calls 10 execute packages in a
workflow to create flat ASCII files from tables.

I know that in order to change the Source Server and Database name in
the Microsoft OLE DB Provider for SQL Server, that I will need to pass
in a global variable, but I am clueless on how to use ActiveX to
write VB code to accomplish this.

I'm sure some of you have done this. Can anyone help me out?

Re: Getting the Server and Database Name from the Command Line Allan Mitchell
11/20/2004 7:40:38 AM
Your subject line suggests you are doing this on the cmdline in which case using SQL Server 2000 you would use the /A argument to
the DTSRUN executable
Inside the package you would just set the correct properties to the correct variable.

In VB, which is what the body f your post suggests you are using then I would be inclined to use the object model to grab the
package and then set the properties in code.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


[quoted text, click to view]

AddThis Social Bookmark Button