Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2003-11-19 : 14:02:52
|
| HeyI want to restore my database, but I am running my wizard to restore the database it gives an error that database in use. Can anyone help me in restoring the database. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-11-19 : 14:10:04
|
| You have to kill all the users in the database before you can restore over it.Might be easier to drop the database first.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-11-19 : 15:28:45
|
| [code]ALTER DATABASE <dbName> SET SINGLE_USER WITH ROLLBACK IMMEDIATERESTORE DATABASE <dbName> FROM DISK = 'D:\*.dmp' WITH MOVE '<dbanme>_Data' TO 'D:\Database\Server\Instance\Data\<dbName>.MDF' , MOVE '<dbname>_Log' TO 'D:\Database\Server\Instance\Data\<dbName>.LDF' , REPLACEALTER DATABASE <dbname> SET READ_WRITE[/code]Brett8-) |
 |
|
|
|
|
|