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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 database in use impossible to restore

Author  Topic 

olibara
Yak Posting Veteran

94 Posts

Posted - 2011-10-13 : 03:07:15
Hello

I'm trying to restore an sql 2008 database
But is says tha the database in in use
So I try to set the database off line
And it runs an infinite loop

However this is a 'test' database and normaly there are no user and no activity on it

What can be the problem what can I do to figure out what's hapenned ?

Thanks for any help

Kristen
Test

22859 Posts

Posted - 2011-10-13 : 03:22:38
Are you connected to the database itself? Try doing it from MASTER

USE master
GO
ALTER DATABASE MyDatabaseName SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
... restore ...
Go to Top of Page

olibara
Yak Posting Veteran

94 Posts

Posted - 2011-10-13 : 04:08:35
Thank you Kristen

I've tryed your suggestion

Here is the resulting message

quote:
Msg 5061, Level 16, State 1, Line 1
ALTER DATABASE failed because a lock could not be placed on database 'TouchBeta'. Try again later.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Go to Top of Page

olibara
Yak Posting Veteran

94 Posts

Posted - 2011-10-13 : 04:27:54
Hello

Finaly after closing et restarting SSMS it works
And the back-up also now

Thank you
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-10-13 : 07:04:32
You might want to check if there is a newer version of Tools (including SSMS) available?
Go to Top of Page
   

- Advertisement -