Solved

How to remove an offline database

Posted on 2008-10-28
13
1,063 Views
Last Modified: 2012-05-05
How can I remove an offline database, I cannot bring it online anymore becasue of a failure (set offline failed for Database 'AA'

Can seomone help me?
0
Comment
Question by:AGION
  • 7
  • 6
13 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 22823768
you could just detach it if you're able to access it.

0
 

Author Comment

by:AGION
ID: 22824815
I also cannot detach it....
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22824832
can you drop it?

drop database dbname
0
 

Author Comment

by:AGION
ID: 22825056
If i Try that using a query if gives me the following message;
 

Msg 942, Level 14, State 4, Line 1
Database 'Ijsselstein' cannot be opened because it is offline.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22825116
you don't need to try to connect to the db...run the statement in the context of the master db.
0
 

Author Comment

by:AGION
ID: 22825147
I run it from the master database;
like this:
DROP DATABASE [AA]
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 60

Expert Comment

by:chapmandew
ID: 22825169
thats odd...it shouldn't matter that it is offline when you try to drop it.
0
 

Author Comment

by:AGION
ID: 22825208
I think that there a problem occured when the database was taken down, but no I can't do anything with the DB
Can I do something through Windows browser?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22825243
One thing you could try is to restart sql server and then try it...if it doesn't work then, stop sql server, move the db files, and start it back up....
0
 

Author Comment

by:AGION
ID: 22825261
move the db files...where are they exactly located?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22825293

run this in a db...will give you an idea as to where the others are.

select * from sys.database_files
0
 

Accepted Solution

by:
AGION earned 0 total points
ID: 22849255
It seems to be fixed in SP2 form SQL 2005
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22849261
good...it sounds nasty
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PK numbers not follow 8 61
SQL Server DeDupe Table 3 37
Stored Procedure error 45 48
passing parameter in sql procedure 9 56
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now