SQL Server Performance

DTS Execution Parameters

Discussion in 'General Developer Questions' started by tstradli, Jul 31, 2006.

  1. tstradli New Member


    Having looked at the MS site I am confused by the syntax I should be using for DTSRun in SQL Server 2000.

    The MS site says the syntax is ...

    dtsrun /Sserver_name /Uuser_nName /Ppassword /Npackage_name /Mpackage_password

    Given a SQL Servername of 'machinenameTstradli', SQL Server User name of 'SA', Password of 'Fred', and a Package Name of 'DoPost' and no package password that I can discern ...

    I am using the string

    "DTSRun /SmachinenameTstradli /USA /PFred /NDoPost"
    and I am getting the error "The filename, directory name, or volume label syntax is incorrect." so obviously SQL Server cannot see my DTS package ...

    Does any body know what I am doing wrong here? Do I need to specify the owner of the package at any point?


  2. waqar Member

  3. tstradli New Member


    I can now execute the package (from a OS command prompt) but the execution returns a runtime error. I do not seem to get any information in the log files or dts log table ...

    I am wondering if I am passing the parameters for the DTS file in in correctly and that is why it is erroring ...

    Given this syntax dtsrun /Sserver_name /Uuser_nName /Ppassword /Npackage_name /Mpackage_password
    and no package password when I specify the 2 string parms for my active X DTS script I get the error saying that the package doesn't exist ... if I specify no parms DTS runs and I get the runtime error ...

    How should I be specifying paramaters as part of DTSRun?

    How do I enable thelogs so I can see the run time error?

    Many Thanks

  4. tstradli New Member

    Note I specify the string parms immediately after the package name.
  5. tstradli New Member

    I have worked out how to see the logs (from properties of the package go to debug tab). But in the log I am just getting an unspecified run time error ...

    I think this is because my step in the package requires 2 string parameters and I am unable to pass them through the DTSRun command ...

    How are parameters passed to DTS Packages and then to Active X scripts from the DTSRun command? Can this be done?

    Many Thanks

  6. waqar Member


    You can use
    to get value in your ActiveX script.

    ~* Opinions are like a$$holes, everyone got one. *~
  7. tstradli New Member

    Yes I understand how to access global variables. How do I populate them or pass parameters between objects?
  8. rsandeep_01 New Member

    Dim objFSO As New FileSystemObject
    Dim oPKG As New DTS.Package
    oPKG.LoadFromSQLServer Glb_SrvName, Glb_AdminName, Glb_AdminPwd, DTSSQLStgFlag_Default, , , , "PMS_IMPORT_RAM_POSITION"
    I Think u do on this way

Share This Page