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.) |