Problem in taking database offline.

I am tryting to take database offline; It was taking too much time i closed the 'Database Offline' window. Now, database is still there and not accessible and not offline either. when i try to open it it says in ssms "TITLE: Microsoft SQL Server Management Studio
------------------------------

The database testDb is not accessible. (ObjectExplorer)

------------------------------
BUTTONS:

OK
------------------------------
"

Any urgent resolution to this problem will be highly appreciated.

Thanks.



ezkhanAsked:
Who is Participating?
 
ezkhanAuthor Commented:
I have solved the problem by myself. None of the answers provided by ee are correct. There was an active connection to the database; I killed the connection and database went offline and all sorted.

Anyway Thanks for your comments.
0
 
dj_alikCommented:
Restart SQL SERVER and try again
0
 
lcohanDatabase AnalystCommented:
You should run the command below against your SQL server and check its status - just replace 'model' with your actual DB name:

select name,database_id,is_read_only,is_auto_close_on,state,state_desc,is_in_standby,is_cleanly_shutdown from master.sys.databases where name = 'model'
0
 
ezkhanAuthor Commented:
I have solved the problem by myself. None of the answers provided by ee are correct. There was an active connection to the database; I killed the connection and database went offline and all sorted.

0
 
ezkhanAuthor Commented:
I have explained the reason in my comment.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.