Syntax Error For DTSRUN Command

  • I'm trying to use a DTSRUN command, and I keep getting a syntax error of

    "Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '/'."

    The database is MSDB, and the exact code I'm using is:

    "dtsrun /SDHSBAYSQL05 /Udsperedelozzi /PMSMSDATA /NFull_Data_Import"

    There is no password for the DTS job. Can you tell what's wrong with my code?

  • The message you get sort of points to an error with some SQL being used within the package.

    Can you successfully execute the package via the designer?

    Thanks

    Phill Carter

    --------------------
    Colt 45 - the original point and click interface

  • the package runs fine from the designer. the issue is definitely with the line

    "dtsrun /SDHSBAYSQL05 /Udsperedelozzi /PMSMSDATA /NFull_Data_Import",

    as the error specifically points to the "/", although which one it is pointing to i do not know. any environment in which i run this line of code gives the same error. my question is: what is wrong with this SQL statement?

  • Well for starters it's not an SQL statement, it's a CmdExec statement. That's probably the cause of the error.

    Thanks

    Phill Carter

    --------------------

    Colt 45 - the original point and click interface

    --------------------
    Colt 45 - the original point and click interface

  • quote:


    In DTSRUN command, I have seen people using an encrypted package name. How do you do that?


    Use the /!Y option on the DTSRUN command to generate the encrypted string.

    Check 'dtsrun Utility' in Books Online.

    Hope this helps

    Phill Carter

    --------------------

    Colt 45 - the original point and click interface

    --------------------
    Colt 45 - the original point and click interface

  • Try the dtsrunui command. This will start a GUI that you can use to run a dts package, or, it will generate a command line for you.

    Andy

  • quote:


    "Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '/'."

    "dtsrun /SDHSBAYSQL05 /Udsperedelozzi

    /PMSMSDATA /NFull_Data_Import"


    I usually see a line like this:

    "dtsrun /~S DHSBAYSQL05 /~U dsperedelozzi /~P MSMSDATA /~N Full_Data_Import"

Viewing 7 posts - 1 through 6 (of 6 total)

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