I setup a SQL Agent to send me an email when the Average Latch Wait Time is greater than 300ms. Now I receive an email every 15 seconds stating that the current ALWT is 3916ms. That value never changes with the emails. However, the perfmon shows nothing at all (shows zero).
I also have a Buffer cache hit ratio of 2848.00.
These numbers are when there is NOBODY on the DB at all It is just sitting there. When I reboot the server, as soon as SQL starts it starts to send the emails again.
Server: Intel Xeon Quad Core 2.66
RAM: 4GB (with /3GB in the boot.ini)
RAID 1: OS
RAID 1: Data (DB and logs)
CPU Utilization: 0-1%
RAM Utilization: 527MB
OS: Server 2003 R2 With SP2
SQL: 2005 Standard with SP2
How can I determine if the ALWT is really 3916?
I executed 'Select * from sysprocesses where SPID>50 and waittime>0'
This might be a bit of a question like "how long is a peice of string" however here goes.....
What is considered to be a high average latch time?
We have a SQL2000 machine which has: 700-900 ms average latch time 100% Buffer Cache Hit Ratio No memory pages / second Very low (almost always below 5%) cpu usage Next to no disk transfers / sec 0 average lock time
I am surprised that the latch time is so high. Any ideas, whether I should be looking at something in particular?
During a bulk insert I am receiving this error message in the sql log. It appears to have caused the server to reboot the other night..
I am running SQL 2000 8.00.760 (Service Pack 3)
2004-04-07 12:57:52.82 spid8 WARNING: EC 259683c0, 0 waited 32100 sec. on latch 807133b0. Not a BUF latch. 2004-04-07 12:57:52.82 spid8 Waiting for type 0x4, current count 0xa, current owning EC 0x70899570.
One of your SQLSERVER 7, Server throws the below error message into the log file. It won't go away until the server get rebooted. When this error start showing up.. customers have hard time connecting to the Server, eventually we have to reboot the server.
Time out occurred while waiting for buffer latch type 1, bp 0x18b9200, page (1:50859), stat 0xb, object ID 17:1954106002:1, waittime 500. Continuing to wait.
Ben writes "Dbcc checkdb showed a database to have consistency errors, however running repair_allow_data_loss resulted in the following error
Server: Msg 8966, Level 16, State 1, Line 2 Could not read and latch page (1:1370) with latch type SH. sysindexes failed. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Please could you tell me how to fix it, and how it occurred in the first place?
Hello all,I've got a query which suddently became very slow. It now takes about 10secs instead of 2 secs.I've got to identical DB (one is for test and the other is production). Thequery is slow only in production.When running this query in both DB and looking at execution plan,statistics, etc, the onle difference is the Cumulative wait time on serverreplies.In test DB, I get the value: 2200And in production DB: 1.22344e+009What does this mean concretly? What do I have to do to solve this problem?TIA.YannickPS I'm using SS2000 SP3 on NT4.0
just wondering what are the values on your SQL servers for these counters:
Average latch wait time (ms) Latch Waits/sec
We set up two servers, both are quad machines (4 cpus) with SANs devices as a HD space (RAID5) that operate via fiberchanels (can't be faster). Both server have 4 Gb of RAM. Both have SQL2000 Ent and Win2000 Advance Server. The only difference between them is that the first one is clustered the second one is not, so.
The clastered Server has values:
Average Latch Wait time - 2782.285 Latch Waits/sec - 62.065
The non clastered Server has:
Average Latch Wait time - 550.108 Latch Waits/sec - 21
There are two similar databases located on them and the same application (two separate instalations) with a similar load utilizes the DB.
I wounder whe could be a reason for such a different values?
More of an FYI in case anyone has run into this problem...We were running into the infamous "timeout on buffer latch type 3" error andwas caused by the autogrow in tempdb. Apparently when SQL Server is gettinghit pretty hard and tempdb is taking a timeout to auto-grow, SQL servercraps its pants and times-out. This combined with the fact that tempdbshrinks down to its last set size after a restart, you'll hit this errorpretty regularly after a SQL Server bounce. (If tempdb auto-grow from a set1GB to 10GB, after the restart tempdb will be 1GB again. - Just how gay isthat?) Anyway, we just manually set tempdb to a respectable level to resolvethe problem.
we''re currently performing a dry run of migrating some large (100GB+) SQL Server 2000 databases from a SQL 2000 cluster onto a new 2005 mirrorred database pair. The new configuration has completely separate database servers and a new dedicated SAN.
Upon restoring our largest database we are seeing the following errors recorded in the log after setting up mirroring and then trying to run DBCC CHECKDB:
"Unable to read and latch page (1:1323852) with latch type SH. 21(The device is not ready.) failed."
We are currently investigating the SAN hardware logs to determine if this might be a physical issue as it would seem to indicate, however has anyone any experience of this or insight into what may cause this error?
Is it possible to generate a script, that extracts every bit of data it can, from tables which suffers from latch errors;
DBCC CHECKDB -> Msg 7985, Level 16, State 2, Line 1
System table pre-checks: Object ID 4. Could not read and latch page (1:403) with latch type SH. Check statement terminated due to unrepairable error.
So bad news on that one. There are no backup available that I know off, so all bets are off on that part of the recovery process.
The "good news" part of the problem, is that it is possible to extract some data out of the table, before SQL server 2005 returns the error. So what I want to do, is get every bit out I can, doing it somehow automatically, so I don't have to run bcp on 180 tables :).
Presumeably, this is quite possible, but how?
NB. If I do a complete basic SELECT * FROM tbl1, it returns data, then errors out, but what about the data after the last row SELECT returns? Is it possible, that there might be data in the table that are recoverable after the 'broken row(s)'?
I am running into problems while running a large procedure, and i think it may have something to do with a PAGEIOLATCH_SH wait problem. My server, whose sole purpose is to run this one procedure, is doing plenty of disk i/o, and the CPU’s bouncing around, so I assume it’s working. But when I look at its process info, it seems to be sleeping a lot of the time on PAGEIOLATCH_SH. No other users are in the DB, so I'm quite confused. I don't find much info on this anywhere, so any insight would be very appreciated.
I'm new to SQL Sever 2005 and I'm trying to do what Informatica (Power Center - ETL) is trying does.
I have created a work flow and it is scheduled to run at every night 1:00 AM .The process is to load a flat file (CRV.data) into the database from a shared location.The flat file is transfered from a 3rd party and once the file transfer is complete it will create a indicator file (0 byte eg: CRV.DONE file) which indicates the CRV.data transfer is complete.
In my workflow I will be waiting for the CRV.DONE indicator file and once it is avaiable I will start loading the CRV.data and once the load is completed I will delete CRV.DONE file and be ready for the next day load.
Please let me know if there is any way in SQL Server 2005 to achieve it.Thanks
Hi. We are migrating a mainframe datacom database to SQL Server. One of our client-server applications already uses SQL Server. This application uses a middleware product to query and update the datacom database being migrated. We are considering using Service Broker to replace the middleware.
In many cases the client does not need a response provided the message is queued and will eventually get delivered. However, in some cases the client would like to wait for the message to be processed before proceeding. Is there an easy way to both submit and optionally wait for a response - with data - in a single stored procedure? If client does not want to continue to wait, is there a way to use a procedure to check for the returned message later?
We have not used Service Broker before and are doing for a "sanity" check before proceeding. We do not want to tightly couple the two databases at this time.
I have installed performance dashboard on 2 different servers. The first server have User Session CPU Time 71% and Wait Time =28%, The other server have Cpu Time of 20% and Wait Time of 79%. Have I understand that stands in SQL Server Waits And Queues that I have some typ of wait problem in my second server?
Then I tries to run this Select
'%signal waits' = cast(100.0 * sum(signal_wait_time_ms) / sum (wait_time_ms) as numeric(20,2)), '%resource waits'= cast(100.0 * sum(wait_time_ms - signal_wait_time_ms) / sum (wait_time_ms) as numeric(20,2)) From sys.dm_os_wait_stats
First Server %signal waits %resource waits --------------------------------------- ---------------------------- 0.07 99.93 Second Server %signal waits %resource waits --------------------------------------- ---------------------------- 0.12 99.88
Does anybody know what might cause the following message to show up inthe SQL Server Error Log?:Time out occurred while waiting for buffer latch type 2, bp0x12260f80, page (5:77914), stat 0x40d, object ID 7:421576540:0,waittime 500. Continuing to wait.I've read several articles about what to do about this situation onSQL Server 2000, but I'm running SQL Server 7.0. Specifically, I'mrunning version 7.00.842. Is there a way to resolve this problemwithout upgrading to some flavor of SQL Server 2000?
I'm doing an update on a table with about 113m rows, the update-statement is fairly simple: update tab set col = null where col is not null. The col column is mostly null.
Sysprocesses shows three rows for this statement: 1 CXPACKET (its a dual processor, 2000 box with sp3 installed), 2 PAGEIOLATCH_SH (waitresource is filled). My guess would be that the where-clause is executed in a seperate process blocking the update.
I changed the statement into update [...] set col = null; sysprocesses shows one row with PAGEIOLATCH_SH. Executing forever.
I checked other processes including those outside sqlserver but none are using the db, let alone accessing the table involved. Even restarted sqlserver to be sure there's no dead process blocking the update. Didn't help.
So I added a search condition to the where-clause, involving a clustered index in order to reduce the rowcount. The execution plan shows a 97% hit on the clustered index, but sysprocesses shows the three rows again...
So far the profiler didn't help me out either: there's a SP: CacheInsert on the update-statement... then nothing.
I have an ASP.NET web application that hangs on a single database UPDATE command for 5+ minutes. I can see this occur in SQL Profiler. This is a one row UPDATE statement on a small table (~600 rows). There are no JOINs or sub queries. There are no other users using the system. During this 5+ minutes, I can see the job in Enterprise Manager with a wait type of NETWORKIO. Since both IIS And SQL Server are running on the same system, the network shouldn't be an issue. Any ideas?
I'm writing a small vbscript to backup a db and some related files, so I used a WSShell calling OSQL to run a Sql BACKUP command, then after it's finished I XCOPY the resulting file plus some other related files. But the problem is that OSQL ends it's execution as soon as the BACKUP command is sent to SqlServer, not when the backup itself ends. Anyone knows how to synchronize the two? How to wait, inside OSLQ, for the end of the BACKUP execution? TIA Luigi