April 29, 2016 at 3:52 am
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.
April 29, 2016 at 4:03 am
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
April 29, 2016 at 5:40 am
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
April 29, 2016 at 5:43 am
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