dbTalk Databases Forums  

How to add RESTORE permission to Sql server 2000 & 2005 users

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss How to add RESTORE permission to Sql server 2000 & 2005 users in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #61  
Old   
Russell Fields
 
Posts: n/a

Default Re: How to add RESTORE permission to Sql server 2000 & 2005 users - 01-11-2008 , 07:27 AM






Mohamed,

Did you grant 'TestHtms' access to the 'HTMS_Temp1' database?

You will notice in my first scenario that it was necessary to grant some
rights to the database, though in my case simply making 'RLFTest' a member
of the public role was enough.

A note: If the restored database did not already have RLFTest as a user,
RLFTest lost access to the database once the restore was complete.

I notice that you are using SQL Server 2005 Express. That is was I also
used to test.

RLF


"Mohamed Kaleel" <Mohamed.Kaleel (AT) kaleel (DOT) com> wrote

Quote:
For the first Scenario, i get the following error

===================================

Restore failed for Server 'MyMachine\HTMS_PROD'.
(Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click:
http://go.microsoft.com/fwlink?ProdN...er&ProdVer=9.0
0.3042.00&EvtSrc=Microsoft.SqlServer.Management.Sm o.ExceptionTemplates.F
ailedOperationExceptionText&EvtID=Restore+Server&L inkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Restore.SqlRest ore(Server srv)
at
Microsoft.SqlServer.Management.SqlManagerUI.SqlRes toreDatabaseOptions.Ru
nRestore()

===================================

System.Data.SqlClient.SqlError: Server user 'TestHtms' is not a valid
user in database 'HTMS_Temp1'. (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click:
http://go.microsoft.com/fwlink?ProdN...er&ProdVer=9.0
0.3042.00&LinkId=20476

------------------------------
Program Location:

at
Microsoft.SqlServer.Management.Smo.ExecutionManage r.ExecuteNonQueryWithM
essage(StringCollection queries, ServerMessageEventHandler
dbccMessageHandler, Boolean errorsAsMessages)
at
Microsoft.SqlServer.Management.Smo.BackupRestoreBa se.ExecuteSql(Server
server, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRest ore(Server srv)




*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.