Set DTS Global Variable with TSQL Possible?

  • Inside a SQL2K DTS package, there is a global variable called "Status_Ind", which is a bit.  Can I write some kind of a TSQL statement that will allow me to set the value of this global variable?  Does anyone know the syntax?

    Thanks.

  • 2 ways I know of (there may be more).....

    Use a Dynamic Properties task to set the value (you can use a query, ini file etc)

    or

    Use a stored proc and pass parameters as the output from the proc to the gv



    Shamless self promotion - read my blog http://sirsql.net

  • I had been using the following style to run the DTS in a job:

    exec master..xp_cmdshell 'dtsrun /S"ServerName" /E /N "DTS Name"'

    and that's been working fine.  Could you give a sample line on how the parameters could be passed to the DTS in T-SQL?  I'd prefer that it not have to go to an outside source (INI file, record in a table, etc) to get the information it needs.  My goal is to not have those kinds of dependencies.

     

    TIA

    Andre

  • Look at DTSRUN in Books Online, specifically look at the /A switch, it allows you to pass global variables in.



    Shamless self promotion - read my blog http://sirsql.net

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply