Unable to restore a database. SQL Server says I do not have permission to restore the database even though I am the db owner

When I try to restore a database, I get the following message " "User does not have permission to to RESTORE database D_AppCenter_Mail" RESTORE DATABASE is terminating abnormally." Can someone tell me why am I getting this message even though I am the db owner for that database?
deewaniAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ayufansConnect With a Mentor Commented:
well.. because it exist. You can't just restore over an existing database. You either delete the existing database first or you restore it as a new db with different name.
0
 
Scott PletcherSenior DBACommented:
You are restoring over an existing db, right?  I mean, the db wasn't deleted first and then you attempted to restore it.
0
 
deewaniAuthor Commented:
Yes. It exists.
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
deewaniAuthor Commented:
Ayufans,

I was able to before. I would not give me "User does not have permission to restore database" error if I was not allowed to. See what I did is I created a backup of the database on a certain drive as .bak file. Meanwhile, I played with the data in the tables a little bit. Now I want the old data back so I am just trying to restore it. Why wouldn't it allow me to do it? Does not make sense that because I have an existing database it would not allow me to. But, I will try renaming the database and see if it allows me to.
0
 
arbertCommented:
You CAN restore over existing databases--you just add the REPLACE option on your restore command.

deewani, are you sure you have security rights to restore the database--maybe your rights have changed since the last time you did the restore?

Brett
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I agree with arbert that you can restore very well over existing database. Now, the error message that you provided indicates that you are not connected with good permissions:
<from SQL BOL>
If the database being restored does not exist, the user must have CREATE DATABASE permissions. If the database does exist, RESTORE permissions default to members of the sysadmin fixed server role and the db_owner fixed database role.

CHeers
0
 
arbertCommented:
What's up with this qustion?
0
 
arbertCommented:
What's up with this question?
0
 
CleanupPingCommented:
deewani:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
monosodiumgCommented:
No comment has been added to this question in more than 268 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: ayufans http:#8184967

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

monosodiumg
EE Cleanup Volunteer
0
All Courses

From novice to tech pro — start learning today.