Groups | Blog | Home
all groups > sql server programming > april 2007 >

sql server programming : Database hanging for no apparent reason.


David W
4/26/2007 11:48:31 PM
I have this database in our stage environment (SQL 2005) that keeps hanging
for no apparent reason. It is only used by one person so the load is
negligible and there are no other databases on that instance. There is a
second instance on the same server and those databases are fine. The server
total utilization is very low. There is no one particular query the
database keeps hanging on - it is somewhat random.

The access to the database is primarily through IIS/OLEDB. I can fix it by
going into Management Studio (sa) and running ANY query or DBCC statement -
whatever I run will take about 15 seconds, then the database is fine - for a
few hours at least. I've rebuilt several tables that I thought were the
problem, but nothing. I have 50+ structurally identical databases running
on dev and live servers that are fine.

sp_who2 reports no blocks or long running queries. DBCC checkdb reports no
problems. I have run DBCC DBREINDEX on all tables. I'm really not sure
what to check now. Any suggestions??

-Dave

David W
4/27/2007 12:00:00 AM
Great suggestion, but no, that wasn't the case. I checked all the options
while I was at it, but everything looks fine. Thanks.

[quoted text, click to view]

SQL Menace
4/27/2007 2:45:08 AM
[quoted text, click to view]

Is that particular DB set to close when there is no activity?
when you run the following (change DatabaseName to you database name)
does it return 1? If yes then autoclose is true
SELECT DATABASEPROPERTYEX( 'DatabaseName' , 'IsAutoClose')


Denis The SQL Menace
http://sqlservercode.blogspot.com/
SQL Menace
4/27/2007 7:51:36 AM
[quoted text, click to view]

Are the MDF, LDF or NDF files placed on one of those USB removable
harddrives? These things tend to go into some idle state every now and
then


Denis The SQL Menace
http://sqlservercode.blogspot.com/
David W
4/27/2007 11:44:50 AM
No, its on an internal drive - same drive as the other databases on the
server. I did a backup-delete-restore of the db - see if that helps
anything... Thanks.

[quoted text, click to view]

AddThis Social Bookmark Button