Using xp_cmdshell

Last Post 23 Jan 2006 07:59 AM by sahrisoror. 4 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
sahrisoror
New Member
New Member

--
20 Jan 2006 09:36 AM
I wan to use xp_cmdshell to copy an sql file on another machine (which has a linked server). I use it like this:
EXEC master..xp_cmdshell 'copy c:\test\query.sql \\Dell7\test' --Dell7 is the other machine

when i apply this query to copy in the local server, it functions, but for the linked server i always have this error :
-----------
Access is denied.
0 file(s) copied.
NULL
---------------

I have tried to use xp_sqlagent_proxy_account, but there is no result. What can i do please?
Regards
sahrisoror
New Member
New Member

--
21 Jan 2006 05:06 AM
i have an administrator account, what can configure then to have these permissions please?
sahrisoror
New Member
New Member

--
23 Jan 2006 06:21 AM
how can i use it please. We have not this configuration in our network. Is there other solution to use the xp_cmdshell command?
best regards
sahrisoror
New Member
New Member

--
23 Jan 2006 07:12 AM
when i execute the xp_sqlagent_proxy_account command as below

master.dbo.xp_sqlagent_proxy_account N'SET',
N'Administrator', -- agent_domain_name
N'DELL1',--gent_username
N''-- agent password
-------
i have this error: Error executing extended stored procedure: Specified user can not login

Just now in our network we don't have a domain, we have a workgroup
sahrisoror
New Member
New Member

--
23 Jan 2006 07:59 AM
yes i ca, the same command function when i do a copy in the local server. Now, i have resolved the pb with the xp_sqlagent_proxy_account command, it's executed succesfuly. But for, it's the same pb.xp_cmdshell
EXEC master.dbo.xp_sqlagent_proxy_account N'SET',
N'DELL1', -- agent_domain_name
N'Administrator',--gent_username
N'manoulati'-- agent password


Acceptable Use Policy
---