1
votes

I try to backup database using code below :

backup database RestaurantManagement to disk = 'd:\'

sqlserver always show the message below :

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

How can i code it ? help...

2

2 Answers

2
votes

You need to provide the backup file name, like this:

backup database RestaurantManagement to disk = 'd:\backups\RestaurantManagement.bak'
0
votes

Are you a member of the appropriate sql role? Does the account which Sql Server is running under have permissions to the path? Are you sure the media is available on the server? What I mean is, you may have a d: on your machine, but the paths you give are for the remote server.

The error you're getting indicates there's no d: drive, or no folder named backups.

I would double check all those things.