Execute server DTEXEC from a PC

  • Hello,

    I want to give a user with Windows 7 PC, a batch file which can execute a DTexec on a server. It produces a file in the same folder he can use later.

    How do I go about doing this?

    He has only SQL Express on his PC with SSMS only.

    Thank you,

    BK.

  • Assuming the server also runs the database engine and that xp_cmdshell is enabled, create a stored procedure that executes the dtexec command, and give him permission to run the stored procedure. Alternatively that runs every five minutes, say, and checks for a flag file (or a value in a database table) that the user controls and runs the package if it finds it.

    John

  • John,

    Thank you for that. I would prefer if the user has to double click on a batch file which has DTEXec with parameters in it.

    He is not technical enough to do via SSMS.

    BK

  • Well, you did mention SSMS! But anyway, that's easy. Use sqlcmd to call the stored procedure, and wrap that in a batch file.

    John

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

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