Posted by blueboy on 03/21/07 13:39
Hi
I finally got this working so thanks for anyone else here is the
script i used
databasename should be the Database Name
step 1 kill conections
ALTER DATABASE databasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE
step 2 restore DB
RESTORE DATABASE datbasename
FROM DISK =
'F:\backup\databasename.bak'
WITH MOVE 'databasename_Data' TO 'F:\MSSQL\MSSQL\Data\databasename
MDF',
MOVE 'databasename_Log' TO 'F:\MSSQL\MSSQL\databasename.LDF',
STATS = 1, REPLACE
GO
step 3 allow connections
ALTER DATABASE databasename SET MULTI_USER
Navigation:
[Reply to this message]
|