December 20, 2007 at 9:54 am
Hi All
Am having a serious problem...Am able to delete the mdf and ldf files of databases in my server even if they are online.Am using SQL Server 2005 Developer Edition.Can anyone tell a solution or reason for this issue....
Thanks in Advance
December 20, 2007 at 9:58 am
Strange, Once you delete it , is the database still working?
Did you check the file path of the DB to make sure that the file you are able to delete is the right MDF and LDF file.
-Roy
December 20, 2007 at 10:04 am
Is the DB set to autoclose? Is it offline?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 20, 2007 at 11:42 am
Databases not offline and ...if i delete mdf and ldf then am not able to access the database.but if i restore the database with a dump then mdf and ldf are recreated.
December 20, 2007 at 12:42 pm
Is the DB set to autoclose?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 21, 2007 at 6:24 am
How to check whether the DB is in AUTOCLOSE or not and if so how to change that....
December 21, 2007 at 6:57 am
In SSMS you can navigate to the DB right-click -> properties -> Options. It is the top option.
OR
exec sp_dboption [dbname], 'autoclose'
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 21, 2007 at 7:41 am
Also you can uses the query command from SSMS
ALTER DATABASE SET Auto_close on|off to set the database to autoclose on of off status
December 21, 2007 at 8:36 am
Am using SQL SERVER Developer Edition i didnt find any such AUTOCLOSE option in property window of DB.How can i check the present status of AUTOCLOSE?? Is there any TSQL Command to see that????
December 21, 2007 at 8:39 am
Ya i find that in OPTIONS ..It is presently FALSE.
December 21, 2007 at 8:44 am
Are you sure the SQL Server service is running when you are doing the deletes?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 21, 2007 at 8:48 am
Thanks Dude it worked..
Those DB having autoclose option False are not able to delete only those set to true got deleted.
December 21, 2007 at 1:21 pm
Autoclose means that when the last connection is dropped from a DB, the DB is shut down cleanly, just as if the server had shut down. While the DB is closed, SQL keeps no file locks on the mdf and ldf files, as they're not in use.
It's recommended that autoclose is off, due partially to the time it takes to reopen and bring active a DB. Especially if the DB gets bursts of activity mixed with periods of idleness.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply