Monday, March 26, 2012

RESTORE DATABASE question

Hi,
In my SQL Server 2000,
RESTORE DATABASE ETCService
FROM TAPE = '\\.\Tape0'
it gave me an error saying I have no right to do the Restore.
What kind of privilege do I need for doing the Restore Database?
Thanks for help.
JasonIt depends on whether the database you want to restore already exist or not.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:OWpIs%234EHHA.3780@.TK2MSFTNGP02.phx.gbl...
> Hi,
> In my SQL Server 2000,
> RESTORE DATABASE ETCService
> FROM TAPE = '\\.\Tape0'
> it gave me an error saying I have no right to do the Restore.
> What kind of privilege do I need for doing the Restore Database?
> Thanks for help.
>
> Jason
>|||Thanks Tibor.
It's already existed!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> ¼¶¼g©ó¶l¥ó·s»D:uRmHKJ5EHHA.3932@.TK2MSFTNGP02.phx.gbl...
> It depends on whether the database you want to restore already exist or
> not.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
> news:OWpIs%234EHHA.3780@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> In my SQL Server 2000,
>> RESTORE DATABASE ETCService
>> FROM TAPE = '\\.\Tape0'
>> it gave me an error saying I have no right to do the Restore.
>> What kind of privilege do I need for doing the Restore Database?
>> Thanks for help.
>>
>> Jason
>|||Jason
Are you a member of sysadmin server role dbcreator fixed server role?
Probably not, am I right?
db_owner fixed database role do not have RESTORE permissions.
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:ez1JmU5EHHA.3540@.TK2MSFTNGP02.phx.gbl...
> Thanks Tibor.
> It's already existed!
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> ¼¶¼g©ó¶l¥ó·s»D:uRmHKJ5EHHA.3932@.TK2MSFTNGP02.phx.gbl...
>> It depends on whether the database you want to restore already exist or
>> not.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
>> news:OWpIs%234EHHA.3780@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> In my SQL Server 2000,
>> RESTORE DATABASE ETCService
>> FROM TAPE = '\\.\Tape0'
>> it gave me an error saying I have no right to do the Restore.
>> What kind of privilege do I need for doing the Restore Database?
>> Thanks for help.
>>
>> Jason
>>
>|||Here's a section from Books Online, RESTORE DATABASE, Permissions:
"If the database being restored does not exist, the user must have CREATE DATABASE permissions to be
able to execute RESTORE. If the database exists, RESTORE permissions default to members of the
sysadmin and dbcreator fixed server roles and the owner (dbo) of the database (for the FROM
DATABASE_SNAPSHOT option, the database always exists).
RESTORE permissions are given to roles in which membership information is always readily available
to the server. Because fixed database role membership can be checked only when the database is
accessible and undamaged, which is not always the case when RESTORE is executed, members of the
db_owner fixed database role do not have RESTORE permissions."
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:ez1JmU5EHHA.3540@.TK2MSFTNGP02.phx.gbl...
> Thanks Tibor.
> It's already existed!
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> ¼¶¼g©ó¶l¥ó·s»D:uRmHKJ5EHHA.3932@.TK2MSFTNGP02.phx.gbl...
>> It depends on whether the database you want to restore already exist or not.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
>> news:OWpIs%234EHHA.3780@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> In my SQL Server 2000,
>> RESTORE DATABASE ETCService
>> FROM TAPE = '\\.\Tape0'
>> it gave me an error saying I have no right to do the Restore.
>> What kind of privilege do I need for doing the Restore Database?
>> Thanks for help.
>>
>> Jason
>>
>

No comments:

Post a Comment