![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a DTS package containg a Send Mail task, which runs fine when manually executed. Thanks to some great tip at this site I've managed to create a shell command, which also fires the package. What I really want to do is to run this package from a query, which contains: EXEC [master].[dbo].[xp_cmdshell] 'DTSRun /S "(local)" /N "Reissue_eksport" /G "{AD959795-E8C6-4B88-B0D9-5F29EBC38AE5}" /W "0" /E' (The same command that executes fine from Run.) When checking this in the Query Analyzer, it fails with the following error message: Error: -2147220352 (80040480); Provider Error: 0 (0) Error string: Logon failed: MapiLogonEx Failed due to MAPI error 273: MAPI Logon failed. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 1100 Now, I've come to realize that the Outlook/SQL Server MAPI configuration is supposed to be a mystery to most users, but what's the difference that yields two success cases and one sad failing here? Is DTSRun something entirely different than manually executing a package? I'm guessing the problem occurs within the xp_cmdshell - any way to bypass this in this circumstance? Hope someone can help a novice - TIA. knut, oslo, norway -- Message posted via http://www.sqlmonster.com |
#3
| |||
| |||
|
#4
| |||
| |||
|
#5
| |||
| |||
|
|
I struggled with this problem realy long time, but finaly i have found workaround and it even works with MAPI. Insted of calling the DTS package from xp_cmdshell, create and SQL Job (it does not has to be enabled) who calls the package in one step as Operating System Command (CmdExec) with Command like: DTSRun /~Z0x1C04218A874655D55ABDBE2C4A6316BFB718E61387458A E8734779E24A5B52E222F D72E8EA466FCE5E2798629DA20736AFA22481DF438FC131909 65C35CB87F733EA611DED0 19BABD128269A0EF4809B4E97A6A43658435D902B6A78073DA 1A71F6B77 You have to find the encrypted command used to execute the DTS package, it can be done by executing DTS in Query Analyser as xp_cmdshell DTSRun command with parameter /!Y. This command actualy runs DTS without executing it, just returns the encrypted command. |
![]() |
| Thread Tools | |
| Display Modes | |
| |