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 |
Ajdin
Starting Member
2 Posts |
Posted - 2014-10-17 : 09:17:45
|
Hi, DECLARE @cmdstr as varchar(128) set @cmdstr='MOVE /Y \\Mobispu\old\IGST_0104.TXT \\Mobispu\old\Test\IGST_0104.TXT' print @cmdstr EXEC master..xp_cmdshell @cmdstr OUTPUT : 'Access is denied.'NOTE: I've given 'full control' permission on both folders.Please advice. |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-10-17 : 09:33:47
|
It's not about folder permission. It's about the account the command runs under on sql server. Often these accounts do not have permission to access remote directories. If it were me, I'd write a little SSIS package to do the work, set up a Sql Server agent job to run it under a proxy that has appropriate network access. Or, run it with DTEXEC with an appropriate account. |
|
|
Ajdin
Starting Member
2 Posts |
Posted - 2014-10-17 : 09:39:28
|
At the local files works ok, but when I Move a file in the network appears this error.. |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-10-17 : 10:08:19
|
Yes, its just what I told you. the account running the command (not your login!) does not have permissions on the network |
|
|
|
|
|