Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ramdas
Posting Yak Master
181 Posts |
Posted - 2003-02-07 : 15:37:19
|
| Hi folks,I am trying to execute a package through a stored procedure. This stored procedure uses the sp_OA stored procedures. The DTS package gets loaded ok but the package does not execute and I get a obsure error. what couldbe the reason as to why the DTS package loads but not execute.ByeRamdasRamdas NarayananSQL Server DBA |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-02-07 : 22:32:18
|
| post your stored procedure. |
 |
|
|
smithje
Starting Member
32 Posts |
Posted - 2004-02-10 : 15:54:13
|
| If you save the DTS package to a file you can run it from a stored procedure with the following line:EXEC MASTER.DBO.XP_CMDSHELL 'DTSRUN /F E:\JOBS\[pkg name].dts /N [pkg name]'in the example E:\JOBS\ represents the path to the saved package. Yours will be different. If you saved the package as SQL Server, the default in SQL2000, you have to use a more complex EXEC command:EXEC MASTER.DBO.XP_CMDSHELL 'DTSRUN /S DNVRCOSW00B /U UserName /P Password /N [pkg name]'EXEC MASTER.DBO.XP_CMDSHELL 'DTSRUN /S DNVRCOSW00B /U UserName /P Password /N [pck name]'/S is the servername/U is your generic user name (I think it has to be a domain user account)/P password/N DTS package name In all examples the [brackets] are not included.If your database resides on a remote server where administrator will not give your account access to the command line like we are experiencing then you will not be able to do either of these methods and we would greatly appreciate some advise on how to run DTS packages from a query, stored proc or a web page without using the call to the cmdshell.DTS packages scheduled as jobs and called from a query using sp_start_job fail for the same reason. |
 |
|
|
|
|
|