I'm new to SQL Server SMS and need help. I have been asked to check that .BAK files restored be checked using SELECT queries in SQL SMS. I have tried to create a new database but get the error "CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262)". It does not give much information so I can find out and Googling it didn't help either. Also if I drag and drop the .BAK file into the SQL SMS window, I am told that there is no editor available?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
migrated from stackoverflow.com Mar 12 '12 at 15:09
This question came from our site for professional and enthusiast programmers.
First, you need CREATE DATABASE permissions to create a database. The db_creator role may be best for you in this case. Second, you need to script the restore.
RESTORE DATABASE someDatabase FROM DISK = N'D:\sql\backups\myDatabase.bak' WITH STATS = 10 ; GO
The .bak file is the default file type for a SQL server DB backup file. This file is created when you use a
Point your restore to this .bak file and you will be able to restore the DB on your server. If you are overwriting an existing DB use the