1

I am trying to create a back up for an SQL Server database using command line.I have used the following command:

C:\>SqlCmd -E -S DEVE-PC3/SQLEXPRESS -Q "BACKUP DATABASE Exam_Db To Disk='d:\Exam_db.bak'"

But I am getting an error message

Msg 3201,cannot open backup device Operating System Error 5.
Msg 3013,Backup database is terminating abnormally.

What am I missing?

1 Answer 1

2

That error message tells you that whatever account is running the SQL Server service doesn't have permission to write to the location that you've specified. Either choose another location or give the service account permission.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.