September 23, 2011 at 12:11 pm
I'm running the following TSQL
EXEC master..xp_cmdshell '"C:\Program Files (x86)\WinRAR\unrar" e -y \\silverthrone\gadata\IPC\*.rar '
My understanding is that this should unzip the files into the \\silverthrone\gadata\IPC\ directory but once it completes I can't see any files. Any idea what I'm doing wrong?
September 23, 2011 at 12:23 pm
Does the SQL engine have permissions to that folder? Or the proxy? This doesn't run under your account, but the SQL database engine service account (or proxy)
September 23, 2011 at 12:24 pm
How can I find that out?
September 23, 2011 at 12:32 pm
Log in as the service account and try to run the command.
Or run this:
xp_cmdshell 'dir > \\silverthrone\gadata\IPC\dir.txt'
That will tell you if you can write to that folder. Also, the path to the executable needs to be as if you logged onto the Windows host of the SQL Server. It doens't have anything to do with your local path, no matter where you run SSMS from
September 23, 2011 at 12:35 pm
I rant the script but it returned a null
September 23, 2011 at 12:39 pm
Did a file get created in the folder?
September 23, 2011 at 12:42 pm
yes
September 23, 2011 at 12:48 pm
Then it's not security. Is this valid on the SQL Server windows host?
C:\Program Files (x86)\WinRAR\unrar
September 23, 2011 at 12:57 pm
I believe so. When I run it it returns messages saying its extractiing the files
September 23, 2011 at 12:59 pm
Found the issue. When I scrolled down to the bottom of the returned messages there was an error message stating that there isn't enough space for all of the files.
September 23, 2011 at 1:10 pm
Ok, I thought I found the issue. I'm getting an error message stating
Program aborted
NULL
There is not enough space on the disk.
But I know there is enough space, I just deleted the files I unzipped manually and was testing my ssis pkg on.
September 23, 2011 at 1:16 pm
I thought I found the issue. I delete the files that were there from when I unzipped it by right clicking it and reran the script and recieved the not enough space available on the drive.
September 23, 2011 at 1:17 pm
sorry, didn't notice the post was going to the 2nd page
September 23, 2011 at 4:56 pm
Is there a chance there's a quota? Can you log in as the service account and test that way? It might help track things down.
Sorry for the delay in responding.
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply