November 25, 2008 at 5:34 am
I need to perform a backup on one server and have the file sent to another server's hard drive. I think I've got the right code, but wanted to ask. Here's the code--can anyone see any problems?
BACKUP DATABASE [wslogdb63]
TO DISK = N'\\jeamgnt5\WebsenseBackups\wslogdb63_full.bak'
WITH RETAINDAYS = 7, NOFORMAT, INIT,
NAME = N'wslogdb63_full',
SKIP, REWIND, NOUNLOAD, STATS = 50
GO
One last thing....the code parses fine, but when I run it I get this error. Any thoughts?
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device '\\jeamgnt5\WebsenseBackups\wslogdb63_full.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
November 25, 2008 at 6:05 am
The access denied error is because you do not have the appropriate permissions on the shared directory.
The SQL Server service account will need full permisssions to the directory the backups are being written to.
November 25, 2008 at 6:05 am
The code is right. The problem is a permissions issue on the directory you're trying to write the backup to. I believe SQL Server Service account will need write permissions to that network share.
November 25, 2008 at 6:09 am
Thanks! I thought as much. I appreciate the confirmation!
November 25, 2008 at 6:12 am
I'm sorry....I have one more question. When you say the SQL Server Service account.....I'm logging onto the system using my admin log on. How can I verify if the SQL Server Service account has full rights to the destination?
November 25, 2008 at 6:41 am
Everyone--thank--I figured it out. I had to map the shared drive to the computer where I was running the backup. It worked fine....
Again, thanks for your help!
November 26, 2008 at 11:47 am
The mapping will work fine for a manual process. If you're going to schedule it by a job, you have to have the Agent or Server Computer have access to the share drive.
😎 Kate The Great :w00t:
If you don't have time to do it right the first time, where will you find time to do it again?
November 26, 2008 at 11:51 am
Also , the network can be unreliable. Copies and other file operations tolerate this. The SQL Backup process won't.
You really want to back up locally and then copy to a shared drive.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply