|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Issues with xp_cmdshellI am using the following code: Code: Use master DECLARE @reult varchar(200) EXEC @result = xp_cmdshell '\\ITITPAFS02\pds\voicenet\isiti\winzip\wzzip.exe \ \ititpafs01\pds\inetpub\ftproot\accumen\political \at0123.zip \\ititpafs01\ pds\inetpub\ftproot\accumen\political \at0123.xls' IF (@result = 0) PRINT 'success' ELSE PRINT 'Failure' It runs longer than 9 min. I just kill it. Am I doing something wrong? Thanks, Ninel -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200608/1 ngorbunov wrote:
Show quote > I have an xls file that is about 358 kb and contains about 1569 rows. Try putting your command script in a .bat file and calling that from> I am using the following code: > > Code: > Use master > DECLARE @reult varchar(200) > > EXEC @result = xp_cmdshell '\\ITITPAFS02\pds\voicenet\isiti\winzip\wzzip.exe \ > \ititpafs01\pds\inetpub\ftproot\accumen\political \at0123.zip \\ititpafs01\ > pds\inetpub\ftproot\accumen\political \at0123.xls' > > IF (@result = 0) > PRINT 'success' > ELSE > PRINT 'Failure' > > It runs longer than 9 min. I just kill it. Am I doing something wrong? xp_cmdshell. Try running the .bat file directly first to see how long that takes. Finally, make sure the account you're using to run SQL has access to all of the directories and files you are using. |
|||||||||||||||||||||||