DB Timeout /Losing Records

  • Hi,

    I'm having a problem with MSSQL sever 7 timing out in enterprise manager. It will not return a result set, if I add anything to manipulate the result set it timesout. I can do simple select queries

    SELECT *

    FROM users

    or

    SELECT firstname, lastname, email

    FROM users

    but if I any kind of count, order by, or any kind of where clause it times out. I am also losing records from this DB, at 5:00 yesterday I had had 96 new records and at 9:05 I only had 34 new records for the day. I have checked that the server is running ok and it is. The memory usage is fine as is the cpu usage. This is only happening one of my DB’s the rest of them are fine. Has anyone got any ideas as to what might be going on here.

    Cheers Wade

    Edited by - wade on 05/08/2003 03:14:04 AM

  • When your query is running, try running sp_who2 in another session of query analyzer and see if there are any blocks. Does this table not have an index with several rows in it? You might want to run dbcc checkdb during some downtime to see if it finds any errors. Also, have you checked if you are running low on disk space?

    Darren


    Darren

  • Darren

    I have ran sp_who2 and it did not show up any blocks. The disk space on the sever is fine. We have not lost any data all day!?

  • Try to increase the time-out value from Tools --> Options --> Advanced --> Query Time-out.

  • The " I am also losing records from this DB," is a real concern. Did you run DBCC CheckDB, check the errorlog?

  • As said by allen have the query timeout to "wait indifinitely" should make it infinite.

  • Also, have you checked the load on the server to see how bad it may be. If you have a bottlenecked system you may see timeouts on any complicate query and then if gets worse all queries will timeout. Look at memroy, swap file, Hard Drive IO and CPU utilization.

  • How exactly are you checking for "new records"? Some sort of date field? If so, have you ensured that field is not being updated by some other means?

    Also, perhaps if you have transactions that are set to read_uncommitted, you might have a transaction add extra records, you saw them @ 5:00, but then that transaction was rolled-back, hence at 9:05 those records did not exist anymore?

    Just some thoughts....

    Ian

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply