SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 DB Not Available
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dbalearner
Constraint Violating Yak Guru

256 Posts

Posted - 05/15/2013 :  19:20:25  Show Profile  Reply with Quote
I have to Restart the SQL Server Services to make way for the MDF file is in USE to be deleted and it worked there after.

However, after RESTART the SQL Server Service the database underneath is not in ('+') which means not accessible. The DB which is not in (+) is just above in its chronological order, in which the old file has been deleted on its SQL Services being stopped.

Can anyone tell me how to get it accessible from its database node.

Thanks All.

russell
Pyro-ma-ni-yak

USA
5071 Posts

Posted - 05/15/2013 :  19:24:35  Show Profile  Visit russell's Homepage  Reply with Quote
Nobody can if you deleted the .mdf. Why did you do that?

Time to restore from backup.
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1596 Posts

Posted - 05/15/2013 :  19:32:02  Show Profile  Reply with Quote
.mdf is the Main Data File. If its not recoverable then Russell is right; you need to restore from backup. FYI, you can lose the .ldf (Log Data File) and still have a chance to recover the database though anything in the log file would be lost.

=================================================
I am not one of those who in expressing opinions confine themselves to facts. (Mark Twain)
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

256 Posts

Posted - 05/15/2013 :  19:39:47  Show Profile  Reply with Quote
This is on Test Server to delete the Old .MDF which is not a problem for the database in question.

BUT,

The Chronological order DB is InAccessible.

Means,

+DAtabase (Node)

DB1
DB2
DB3

The problem lies with DB1, which have more than a MDF in Detach and Attach (in previous occassions,so I have to delete OLD .MDF file of DB1) while SQL Server Service being STOPPED and RESTARTED successfully.

The Purpose has served me to delete the OLD .MDF to be deleted.

"But On Restart the DB2 which is under the DB1 is Inaccessible."

This DB2 is untouched before SQL Service stop and restart but after restart is inaccessible?

Now how to get this back in working.

Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5071 Posts

Posted - 05/15/2013 :  20:22:35  Show Profile  Visit russell's Homepage  Reply with Quote
Seems you deleted the wrong file. Or perhaps corrupted the file somehow. Do you have a backup? Restoring that is the easiest fix.

If the mdf and ldf exisit, write down their location and try attaching.
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

256 Posts

Posted - 05/15/2013 :  20:42:52  Show Profile  Reply with Quote
Thanks All participated, is now done.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5071 Posts

Posted - 05/15/2013 :  21:35:11  Show Profile  Visit russell's Homepage  Reply with Quote
Great, glad you got it worked out. What was the solution?
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

256 Posts

Posted - 05/23/2013 :  22:26:28  Show Profile  Reply with Quote
I got the Backup from secured location and got it restored.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5071 Posts

Posted - 05/23/2013 :  23:47:47  Show Profile  Visit russell's Homepage  Reply with Quote
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

256 Posts

Posted - 05/25/2013 :  08:25:41  Show Profile  Reply with Quote
! ? it worked
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000