Re: Pass server name inn global variable dynamically!!!

Tech-Archive recommends: Fix windows errors by optimizing your registry



Allan,

Thakns for the respsone. Can you please exlpain how would I repeat it?.
I understand that /S is for server name and /A for global variable.

declare @dtsrun varchar(1000)
set @dtsrun = 'dtsrun /F c:\CM_DTS\TMP.dts /N TMP /E /S ' +
@@servername + '/A gvServer:8=' + @@servername

exec master.dbo.xp_cmdshell @dtsrun

This gives me EXCEPTION_ACCESS_VIOLATION

output DTSRun:
Loading...



Error: -2147221499 (80040005); Provider Error: 0 (0)

Error string: Code execution exception: EXCEPTION_ACCESS_VIOLATION

Error source: Microsoft Data Transformation Services (DTS) Package

Help file: sqldts80.hlp

Help context: 713



NULL

(9 row(s) affected)

The "gvServer" is the global variable I set up in the package properties
(2nd tab).

Thanks!


*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages

  • Unable to enlist in the transaction.
    ... When i execute the same DTS job on another server not running SQL Server I ... Unable to enlist in the transaction. ... Help file: sqldts80.hlp ...
    (microsoft.public.sqlserver.dts)
  • Re: Networking a printer through a router
    ... What is the LPD server? ... Would that be the address of my router? ... The help file says it is the name of the ...
    (comp.os.os2.networking.misc)
  • Re: Trigger Problem
    ... Looks like the path is wrong for the SQL Server machine to be accessing, ... > Error source: Microsoft JET Database Engine ... > Help context: 5003044 ...
    (microsoft.public.sqlserver.dts)
  • Please Help - Transactions wont work in DTS if executed from another machine
    ... When i execute the same DTS job on another server not running SQL Server I ... DTSRun: Executing... ... Unable to enlist in the transaction. ... Help file: sqldts80.hlp ...
    (microsoft.public.sqlserver.dts)
  • Re: Networking a printer through a router
    ... What is the LPD server? ... Would that be the address of my router? ... The help file says it is the name of the ...
    (comp.os.os2.networking.misc)