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 |
|
Onamuji
Aged Yak Warrior
504 Posts |
Posted - 2001-11-30 : 13:23:51
|
| I have the worst development setup... I have 2 workstations acting as development servers. What I need to do is back some file up to a remote server that is backed up daily. I want to schedule the backup. Here's what I was trying to do... Schedule Step 1 would backup the database, Step 2 would copy the backup file to the remote server. However I cannot do it. It gives me Access Denied every time. I've tried using xp_cmdshell to copy the files, to call a batch file to copy the files, to call a WSH script to copy the files... none of the above work! And I cannot get the server to backup the files to a mapped drive. I've verified that the server has read/write access to the share and have created files and copied files manually. My WSH script and batch file works outside of SQL. The xp_cmdshell when run fails everytime. I can use it to do other things just not copy from this server to the remote server. Thanks!- Onamuji |
|
|
RocketScientist
Official SQLTeam Chef
85 Posts |
Posted - 2001-11-30 : 13:37:14
|
| Does the service account that SQL Server is running with have read/write access? More importantly, are you using a service account other than Local System? If so, log in with that account and see if you can run the copy using your WSH script. Otherwise, it's not going to work because of an insufficient security context.-rs |
 |
|
|
Onamuji
Aged Yak Warrior
504 Posts |
Posted - 2001-11-30 : 13:45:38
|
| SQL Service is started under local Administrator ... do you think changing the SQLServAgentExecCmd account to being an administrator would work ? it's only a development box so i'm not really concerned about security since it's on our internal network only...- Onamuji |
 |
|
|
smccreadie
Aged Yak Warrior
505 Posts |
Posted - 2001-11-30 : 14:16:23
|
| If you're on a domain, use a domain account to run sql agent. Give that account rights on the backup server as well and you should be able to do this. |
 |
|
|
Argyle
Yak Posting Veteran
53 Posts |
Posted - 2001-12-02 : 13:57:52
|
| And if you're not in a domain1.Create a new local user with the _same_ name and password on both servers (or use administrator if security isn't important) and add it to the administrator group on each machine.2.Change the SQL Service account to run as this account (or administrator).The important thing is that the name and password is identical on the two servers.Edited by - Argyle on 12/02/2001 14:00:04 |
 |
|
|
|
|
|