Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create ShortCut to run a dts package 1

Status
Not open for further replies.
Mar 12, 2003
678
US
Is there a way to create a short cut to run a DTS package. I want to be able to have a user just click a short cut to run a dts package without having to log on to Enterprise Manager.
 
Use the command line program, dtsrun. See Books Online.
E.g.
Code:
dtsrun /Sservername /E /Npackagename /Aparameter:parm_type=value /AdateEnd:8=2006-03-31
 
Thanks. That works if I have Enterprise Manager installed, but I wan to be able to have a user who does not have enterpise manager installed to run it. Any ideas without using programming.
 
On their machines, map a network drive to the machine hosting Enterprise Manager and with the DTS package.

On the host, possibly create a new folder for this purpose with execute permissions for the users you wish to give this shortcut to.

On the host, open Notepad, enter the dtsrun command with paraemeters. Save the file on the EM host with a name like run_dts.bat .

On their machines, open Windows Explorer, select the file, create shortcut. Copy the shortcut to their desktops.

You can test with this DOS batch file
Code:
dtsrun /?
pause
This bit of code will display the help for dtsrun and wait for Enter to close the DOS window.
 
This is my command line. When I run it the Dos window opens for a split second, but it does not run the Package.
dtsrun / mbhqsql02\sql03 /E /"GreatPlains to Stromberg Extract"
 
While you are getting this running, add a second line to the batch file with the pause command. That will keep the DOS window open until you press Enter.

The parameters must include the parameter identifier in addtion to the value. So
Code:
dtsrun /Smbhqsql02\sql03 /E /N"GreatPlains to Stromberg Extract"
means that the name of the SQL Server where the package is located is mbhqsql02, that you have an instance running named sql03; that the package name is "GreatPlains to Stromberg Extract".

/E specifies a trusted connection (password not required). I am not sure what that actually means, possibly that the package is being run by a remote computer which has been authenticated by a Windows login.
 
I have this working on my end, but the end users do not work. I am assuming that users do not have sufficinet rights on the sql server. What permissions do I need to give the users on the SQl server to execute this dts package. i am using Windows Authentication.
 
The shortcut will not run as a shortcut. I am getting an error stating that DTSRun is not recognized as an internal or external command,operable program or batch file. Any ideas
 
Hmmm.

If dtsrun is not recognized as a command or batch file then I think maybe you have the shortcut setup to execute dtsrun on their local machines instead of on the mapped network drive.

For example, on my workstation the Shortcut Properties shows

Target type: MS-DOS Batch File
Target: V:\rac\run_dts.bat

I have mapped a network drive to the SQL Server machine. On my particular workstation that is drive V: . The drive letter will likely be different on different workstations.

There is a folder on that machine, \rac, and in that folder there is a batch file named run_dts.bat . Inside that batch file are two lines of code, first the dtsrun command with parameters as shown in my previous post, second the pause command.

I used Windows Explorer on my workstation to browse to that file, then right-clicked and Create Shortcut.


As to permissions, I am not sure. It seems likely that a package cannot be run by someone who does not have a login to the instance of SQL Server. Then they would also need permissions to do whatever the package does. I am guessing here. Sorry, I am not a system administrator. ( I simply bribed our sysadmin to give me unrestricted access to our servers. So of course this whole shortcut thing works for me.)

If there are many users who need to run this package, you might consider creating a login which has exactly the necessary permissions and using the /U and /P parameters instead of /E.

Also take a look at Books Online topic dtsrun. Then you will know as much as I do about it.
 
Thanks. I tried exactly how you did it and it came back as the same internal error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top