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 |
besadmin
Posting Yak Master
116 Posts |
Posted - 2009-02-19 : 15:59:04
|
Hey Friends,I am running a DTS job from a stored proc using Sp_OA methods. It does work..mostly...All of the steps of the DTS complete except the last one. When i run the dts by right click execute pacakge it is perfect. When i run from stored proc the second to last step in the dts is exec a stored proc, and the last step of THAT stored proc is drop tmp table, which is successful, but then on success it is supposed to delete a file, which does not happen when i run the dts from stored proc, it also doesnt write to the DTS log when ran from stored proc, but all works perfect if you right click and execute.what am i missing??Thanks a lot for any help friends! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 11:56:05
|
is the file accessible for account running Sp_OA? |
|
|
besadmin
Posting Yak Master
116 Posts |
Posted - 2009-02-20 : 12:19:20
|
well, it doesnt look like it now. I thought since it executes the dts, the dts would just run, it is confusing that it just doesnt complete that last step. all we need to do is delete a txt file. i cannot do it using xp_cmdshell or SP_OA deletefile, i get access denies on xp_cmdshell and it says completed successfully with sp_oa deletefile, but it is not, the file is still there?What do you think i am missing?Thanks! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 12:22:42
|
i think you need to give access right to account which executes SP_OA deletefile |
|
|
besadmin
Posting Yak Master
116 Posts |
Posted - 2009-02-20 : 13:03:32
|
ok i got that part, i used xp_cmdshell and added SQLagent to the folder in which the file i want to delete is.thanks a lot for your help, of course i have a new question now, but i will post a new topic.Thanks again! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 13:06:35
|
cheers |
|
|
|
|
|
|
|