Author |
Topic |
dbalearner
Constraint Violating Yak Guru
272 Posts |
Posted - 2013-05-15 : 19:20:25
|
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
5072 Posts |
Posted - 2013-05-15 : 19:24:35
|
Nobody can if you deleted the .mdf. Why did you do that?Time to restore from backup. |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2013-05-15 : 19:32:02
|
.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) |
|
|
dbalearner
Constraint Violating Yak Guru
272 Posts |
Posted - 2013-05-15 : 19:39:47
|
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)DB1DB2DB3The 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. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-05-15 : 20:22:35
|
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. |
|
|
dbalearner
Constraint Violating Yak Guru
272 Posts |
Posted - 2013-05-15 : 20:42:52
|
Thanks All participated, is now done. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-05-15 : 21:35:11
|
Great, glad you got it worked out. What was the solution? |
|
|
dbalearner
Constraint Violating Yak Guru
272 Posts |
Posted - 2013-05-23 : 22:26:28
|
I got the Backup from secured location and got it restored. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-05-23 : 23:47:47
|
|
|
|
dbalearner
Constraint Violating Yak Guru
272 Posts |
Posted - 2013-05-25 : 08:25:41
|
! ? it worked |
|
|
|