Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4328
  • Last Modified:

How to assign RESTORE DATABASE Permissions

Hello, I have created a new database with Network Solutions.  THey have created a SQL database user for me which I have set to DB Owner and has the same permissions as dbo.

I am trying to restore this empty database on the server with this script:

RESTORE DATABASE myDatabase
   FROM DISK = 'C:\Inetpub\wwwroot\SQL2005_460116_myDatabase_backup.bak'

I get this error:

Msg 3110, Level 14, State 1, Line 2
User does not have permission to RESTORE database 'myDatabase'.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.


What permisison do I have to set to be able to restore myDatabase.  I only have access to that database, but I have full access to it including security.  Do I need access to master?

User does not have permission to RESTORE database 'myDatabase'.
0
hoyaabanks
Asked:
hoyaabanks
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
to RESTORE a database, you need CREATE DATABASE permissions on the instance.
0
 
hoyaabanksAuthor Commented:
How Do I add CREATE DATABASE permissions to the instance?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you run a GRANT statement:
msdn.microsoft.com/en-us/library/ms178569.aspx
GRANT CREATE DATABASE TO youruser

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now