dbTalk Databases Forums  

Restoring DB - Single-User Mode Question

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Restoring DB - Single-User Mode Question in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mary Kerrigan
 
Posts: n/a

Default Restoring DB - Single-User Mode Question - 08-02-2004 , 09:33 AM






I am restoring a database via DTS. First I am setting the DB to
single-user mode, then restoring it:

ALTER DATABASE FOO SET SINGLE_USER WITH ROLLBACK IMMEDIATE
USE MASTER
GO

RESTORE DATABASE FOO
FROM DISK = 'D:\MSSQL7\BACKUP\FOO.bak'
WITH MOVE 'FOO_Data' TO 'D:\mssql7\data\FOO_Data.mdf',
MOVE 'FOO_Log' TO 'D:\mssql7\data\FOO_Log.ldf'
GO

My question is, do I need to re-set FOO to multi-user mode, or is this
done automatically when the database is restored?

(Don't be fooled by the directory names, I am using SQL Server 2000
but we haven't changed the directory structure for the data on this
particular server.)

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.