Solved

How to remove an offline database

Posted on 2008-10-28
13
1,064 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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
 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

822 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