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 |
chwanhun
Starting Member
22 Posts |
Posted - 2005-12-05 : 22:26:34
|
I am trying to use a SQL Server job to restore a database. The job keeps failing so I tried to run the same query in Query analyzer but I keeping getting two error messages.Here is the query:RESTORE DATABASE db_name from backupdevice_nameI also use the DISK = option and specifed the location of the file and still obtained the same results.Here are the results:Server: Msg 3101, Level 16, State 1, Line 1Exclusive access could not be obtained because the database is in use.Server: Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally.When I go to detach the database in Enterprise Manager there is usually 1 user attached. I clear the user and cancel out of the detach window. When I go back into the detach window, there are no users attached. However, after I run the above queries, I still get the same message. Please help. |
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2005-12-05 : 23:24:01
|
Please don't crosspost. We'll get your question answered :) |
 |
|
|
|
|