Wednesday, 21 March 2012

Cannot open backup device

 

One of my DBA fried mailed me related to database backup.  He told me that the backup failed every time and gets an error message like this.

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'C:\AdventureWorks.bak'. Operating system error 5(Access is denied.).

 

To solve these problems I am searching the search engine and find some related note provides my MS mentioned bellow.

The MS Notes:

To enable backups to network drives, perform the following steps:

1.          The SQL Server service must be started using a domain user account to access any

         resources on a remote computer. Verify that the MSSQLServer service is started under a domain 
         account that has write access to both the Windows NT Server share and its underlying partition (if the 
         partition is formatted with the Windows NT file system or  NTFS).

2.            In Control Panel, double-click the Services icon.

3.            Select the MSSQLServer service and then click Startup.

4.            Examine the startup options for the service and verify that This Account is selected and   that a valid domain account is supplied in the       form Domain_Name\Domain_account (with the correct password).

NOTE: If you changed the service to run under a domain account, you must stop and restart the MSSQLServer service.

5.            Verify that the account specified has write access on the Windows NT share to    which you are backing up, as well as the underlying partition (if the partition is  formatted as NTFS). To do this, perform the following steps: 

           

a.            Right-click the share name in Windows NT Explorer.

b.            Click Sharing on the shortcut menu.
c.    On the Security tab, click Permissions.

 

 

The main thing that you have to do is

1.    Check in which account your SQL server is running

Start Menu àAll programsà MS SQL Server 2008àConfiguration ToolsàSQL Server Configuration Manager.
Then choose the Running SQL Server and right click it to get the properties. Then Look at the Log on Tab to find the account information.

 

2.    Give the full permission of these accounts.

 

Hope you like that.

 

Posted by: MR. JOYDEEP DAS

 

No comments:

Post a Comment