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?
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
backup database command using TSQL or SSMS. You can then use a restore command to restore the DB into your SQL server. @Bridge has provided you with two links to restore a DB using either TSQL or SSMS.
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