May 11, 2009 at 12:00 am
hi, i am new to posting topics and hope i have posted it in correct section. if not please move it to right section.
I have started getting error No: 18 [SQLSTATE 01000] on a particular folder when zipping it through
xp_cmdshell via stored proc.
winzip : 8.0(3105). SQL server 2000.
Details: zipping some folders present in a drive. other folders zip up correctly wihtout returning any error. only one particular folder gives the problem. The zip file is however created. but i can't ignore this error.
The size of this zip file is 19GB while for other folders the zip files are under 8GB.
any suggestions highly appreciated
May 18, 2009 at 4:57 pm
Check the command you are running in xp_cmdshell. Get that code and run it in a command prompt to see if it runs. Chances are there is something wrong with the command, not SQL Server.
May 18, 2009 at 11:02 pm
Hi Steve,
Thanks for the suggestion.
The query ran fine in cmd prompt with out any error and the same folder was successfully zipped without any error message on command prompt.
As previously mentioned other folders zip fine with xp_cmshell within procedure.
could the size of folder(~49 GB) and therefore the time to zip it through a proc be playing any role in it !
the snippet is :
EXEC @ReturnValue = master..xp_cmdshell @CMD
where the @CMD is(this is what I ran in cmd prompt) :
c:\progra~1\winzip\wzzip.exe -a -bf:\ziptemp -ef -r -p f:\targetfolder\file.zip "e:\sourcefolder\*.*"
temporarily I have skipped the @ReturnValue value check for errors in the calling proc for this particular folder so that the main proc doesnt fails and it works but i want to fix this issue.
thanks in advance for your time
May 19, 2009 at 2:03 pm
Did you check permissions for this particular folder? Maybe something is not right with the permission. Just a shot in the dark.
-Roy
May 19, 2009 at 2:17 pm
Permissions are what I would check next, as Roy mentioned. The xp_cmdshell can operate with a proxy account, and be sure it has permissions. AFAIK, there is no timeout for an xp_cmdshell command. That shouldn't matter.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply