1

i am doing a backup:

BACKUP DATABASE timeclockplus TO DISK = 'c:\bak.backup'

and i am getting this error msg:

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'c:\bak.backup'. Operating system error 3(The system cannot find the path specified.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

anyone know what is going on here?

2
  • may not be not a good idea to fix in a vista/win7 box. better off backing up to another location then breaking your security permissions Jul 15, 2010 at 1:56
  • Your filename is somewhat non-standard it should really be "backup.bak" not "bak.backup" Jul 15, 2010 at 14:37

3 Answers 3

4

The SQL Server account presumably hasn't got write permissions to the root of C: Try the Backup folder for your instance (example path C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup)

If you use management studio to do the backup but click the "script" button instead of the OK button the default path should be one that works.

6
  • ok so how do i fix that? Jul 14, 2010 at 16:32
  • how do i give it write permissions? Jul 14, 2010 at 16:35
  • 1
    Through Windows Explorer but obviously that would increase the surface area for escalation if any vulnerabilities exist in SQL Server or your code. Where is the instance? Is it installed on your machine or do you access it across a network? Jul 14, 2010 at 16:41
  • it is locally installed Jul 14, 2010 at 16:50
  • 1
    You should be able to see the account that SQL Server is running under by opening the services applet (Start -> run -> services.msc -> OK). I'd create a dedicated Folder - e.g. C:\Backups rather than giving it permissions on the root of the drive though. It should be straightforward but if not you can use Process Monitor technet.microsoft.com/en-us/sysinternals/bb896645.aspx to see any ACCESS DENIED errors and the account that is denied access. Jul 14, 2010 at 17:00
2

If it is a permissions issue, use Windows explorer (right click on your target C: drive, Properties, Security tab) to confirm that the account that the account underwhich the backup is running is allowed to modify/write.

0

Generally you don't want to backup to the root of a hard drive, which is why the SQL Server doesn't have rights to the root by default.

Just backup to another folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .