Hi,
I am backing up one database in one server and trying to restore it in anoth
er server. In the process of retoring, I am getting an error which states th
at I should be using in single mode.
Question 1) Is this restore process feasible?
Question 2) Is it possible to set single user mode from Sql Server Enterpris
e Manager. If not, how is this restore can be done.
I am familiar with attach detach method. However, I am trying to see whether
this operation works. I appreciate any help in advance. Thanks.Hi,
Restore database can not be done if yuo have any user connected to the
database. So easy way to restore the databaseis using
the Query Analyzer.
1. Login to Query Analyzer
2. Set the database to single user using the below command
Alter database <dbname> set single_user with rollback immediate
3. Now restore the database
Restore database <dbname> from disk='c:\backup\dbname.bak' (Use Move
command if you dont have the same directory
structure as source server, Use REPLACE option
if you need to overwrite MDF and LDF)
-- See books online for RESTORE DATABASE for more details
4. Set the database to multi user using the below command
Alter database <dbname> set multi_user
1) Is this restore process feasible?
Yes, Set it to single user using above command
2) Is it possible to set single user mode from Sql Server Enterprise Manager
Not directly in a single command, I think you have to kill the users.
Better way is use the above commands specified in Query Analyzer.
Thanks
Hari
MCDBA
"John" <John@.discussions.microsoft.com> wrote in message
news:2F1A00C1-7203-4F42-B86A-25DDEA97EA68@.microsoft.com...
> Hi,
> I am backing up one database in one server and trying to restore it in
another server. In the process of retoring, I am getting an error which
states that I should be using in single mode.
> Question 1) Is this restore process feasible?
> Question 2) Is it possible to set single user mode from Sql Server
Enterprise Manager. If not, how is this restore can be done.
> I am familiar with attach detach method. However, I am trying to see
whether this operation works. I appreciate any help in advance. Thanks.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment