September 28, 2005 at 12:47 pm
I am trying to use EXEC Master.dbo.xp_cmdshell to initiate the second step in the log shipping process. when I try to run xp_cmd shell 'batch file' I get an access denied. the batch file is
COPY d:\mssql\backup\arsystem\arsystem_backup_device.bak \\servername\d$\mssql\backup\arsystem /y
NULL
C:\WINDOWS\system32>COPY D:\mssql\backup\ARSystem\ARSYSTEM_BACKUP_DEVICE.BAK \\servername\D$\MSSQL\BACKUP\ARSystem /y
Access is denied.
0 file(s) copied.
NULL
September 28, 2005 at 2:06 pm
Hi, can you copy to the local machine? If yes, then it is the account that is running xp_cmdshell does not have access to your share. Either start SQL Server on the domain account that have access to the share or implement copying independently by using Scheduled Tasks in Windows. You will need to use domain credentials in the Windows scheduled job so this person has access to the share.
To check what is going on, check the security log on the computer where the share is for thetime when you get 'access denied" message. The log entry will show you what computer and what account was denied access.
Hope it helps
Yelena
Regards,Yelena Varsha
September 28, 2005 at 2:10 pm
Ma'am, thank you for your reply. I figured it out. I thought that I had synchronized the accounts running the services on both my warm and standby servers. I hadn't and that was why I was getting the "access denied". You are right.
Rob Broyles
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply