DB Engine :: Analyzing Wait Stats

Aug 4, 2015

For one of our SQL server 2005 Ent edition 64 bit SP4 which has transnational replication set up and used for heavy reporting, i was trying to counter out the performance of slow running queries which basically runs and get suspended and most often are seeing waiting:So i tried to analyse the wait stats and come up with below stats where ASYNC_NETWORK_IO dominated for a collection of two weeks data.

View 15 Replies


ADVERTISEMENT

SQL 2012 :: Extended Events And Wait Stats For Specific Session

Mar 4, 2015

I wanted to demonstrate something about CXPACKET wait type. For the purpose of this demo I've created a query in AdventureWorks database that uses a parallel query plan, an extended events session that captured the wait statistics for a single session and a query that shows the extended event's data. I ran it and it worked fine. Then I dropped and recreated the event session (to clear the data), in a new window I wrote a transaction that updated the table fallowed by waitfor statement so the first query will be blocked for few seconds and ran the whole thing again. The select statement was blocked as expected (ran for 9 seconds instead on 1 second as it ran without the blocking), but the wait stats that I got were almost identical to the those that I got without blocking the query.

--Query that uses parallel query plan
With MyCTE as (
select top 50 * from Sales.SalesOrderHeader)
select top 10000 * from Sales.SalesOrderHeader, MyCTE
order by newid()

[code]....

View 1 Replies View Related

DB Engine :: Analyzing What Is Causing The Log File To Grow

Aug 20, 2015

For one of our database we have an issue where its log file got increased rapidly last week on Fri and Sat. The database is on SQL  server 2008 R2 with compatibility level at 80. Please see below log grow events :

First, we thought Index maintenance like Re-index and update stats could have been the reason, but when check the schedule that job ran on 16th using below code:

USE ABC
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GOEXEC sp_updatestatsGO

I know above is OLD fashioned, but we believe that should not be the major cause here? How can i determine what happened on 14th and 15th which cause the event to trigger and log file bumps to 80 and 70 GB both days.

View 8 Replies View Related

DB Engine :: Histogram Of Wait Events

Oct 5, 2015

I would like to know what a particular session is waiting on (cpu, io, memory etc).

For that I try to figure out how to use extended events. I would prefer to avoid the use files written to db-server, why I tried "histogram target".

Well my attempt does not produce usefull output,

-- check current event sessions

SELECT a.name,
CASE WHEN b.name IS NOT NULL
THEN 'Started'
ELSE 'Stopped'
END AS current_state

[Code] ....

The intention was to get a pareto chart, to see the top wait events in the session. I would also like to see amount of cpu used. Based on this tuning effort could be prioritized.

View 6 Replies View Related

DB Engine :: Re-indexing And Update Stats Of Mixed Compatibility Databases In Server 2008r2

Jun 15, 2015

We have recently migrated quite a databases around 20 from SQL 2000 and 2005 to SQL server 2008R2.

I am using Ola's script for index maintenance for those with compatibility level above 80 as i heard it supports that way.

Hence separated in 2 way job where for those with compatibility level 80, we are running job with below query on each database with 80 as compared

USE ABC
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
EXEC sp_updatestats
GO

I am not sure if this is the only way in for those databases, because we are seeing the database getting because of that somewhere using above query.( seems log file filling very rapidly).

But above is not the case with those databases , with compatibility 90 and above.

View 5 Replies View Related

How To Analyzing Db Log?

May 15, 2004

Hi knights,
Pls tell me how to analyzing the db log. I'd appreciate your help!

View 2 Replies View Related

Analyzing Db Growth Per Day

Feb 14, 2005

Well my question is how do i analyze db growth per day. is there a tool i can use or a method. I mean i do take a look at the task view and the files but per day it doesnt move in MB wich is weird since this is a warehouse and their are nightly loads to it inserting maybe 30000 record a night on avg.

Any help would be grately aprreciated.

View 3 Replies View Related

Analyzing Sysjobhistory

Apr 6, 2004

Has anyone written routines to analyze sysjobhistory? I'm looking for a tool/routine to analyze jobs for failures, trends (such as constantly increasing run times) and other information. It's not as straighforward as I had originally hoped it would be.

I am specifically prohibited from using any 3rd-party tools (too expensive per mgmt).

I would be grateful for any input/insight.

Regards,

hmscott

View 2 Replies View Related

Analyzing SQL Profiler Trace

Mar 26, 2007

Hi All,

I am going over the output of a Profiler trace and I've found that the duration for many occurrences of EventClass 15 (Logout) is several seconds, up to a maximum of 20 seconds. That seems excessive just to complete a logout, so my question is, does the duration figure reflect only the time to complete the logout operation or does it include the total time that the connection has been active for?

Thanks in advance
Lempster

View 3 Replies View Related

Analyzing Sql Profiler Results

Jun 17, 2008

sql server was using a lot of the cpu so I ran a trace.

Now i see the results and there are lines with high cpu number with textdata NULL and AppicationName Internet Information Services

how can i figure out what this is?

View 7 Replies View Related

Analyzing A Query In SQL Server

Oct 31, 2006

I have to duplicate a bunch of reports that were produced by a VB6 app. Now I'm using C#, ASP.net and Crystal Reports via VS2003. Each executes a stored procedure in SQL Server (before and now).

For each report I have a Stored Procedure and a View. The View's SQL code is identical to the Stored Procedure except that the two input parameters (startDate and endDate) are removed because Views don't allow parameters.

Some of the reports work perfectly right off the bat. But others are timing out. My initial test of the timing out is to just display the View. If it fails then I know that the the report engine will fail too.

So now I'm trying out the SQL Query Analyzer tool to execute the code in one of the Views. It's now at 29 minutes and still going - at least it hasn't timed out!

My question is this: Is there a way I could examine what's going on with the query to see why it's taking so long?

Robert Werner

View 4 Replies View Related

Tracing , History And Analyzing DTS Package

Nov 15, 2007

Hi guys,
We have 2 databases: DataBaseSource and DatabaseDestination. We need to truncate all the data in DatabaseDestination and put all the data from DataBaseSource into DatabaseDestination.

What is the best way to do that, we have a lot of data?
And what is the best way if we also need to keep a trace of what happened in case we wanna go back and see what happened.

Also , pls, if we use DTS, is it possible that if someone wants to see what the DTS does, is it possible to read the DTS? I mean if I give a dts to sompeone, a new DBA guy in 2 years for example, how can he know what a certain DTS does? I mean does SQL 2005 put the DTS packaege scripts somewhere or is there a friendly way to know what a DTS dsoes exactly?

Also the trace to see if something went bad is important for us?

Sory if i didn t express myself well enough, and thanks a lot for your help.

Rachid.

View 7 Replies View Related

Data Mining In Analyzing Servers

Aug 7, 2006

I am trying to setup a means to analyze our servers using SQL Server 2005 Data Mining. I will be collecting all the logs from the Event Log of each server and store them in a SQL Server database for analysis.

Has anybody done this before? Can you give some pointers? I would appreciate your assistance.

View 1 Replies View Related

Analyzing Lock Order Of Queries Against Same Table To Prevent Deadlocks

Aug 5, 2014

I need to discover the actual order in which locks are acquired on a table during a query.

This with a goal of analyzing the lock order of queries against the same table to prevent deadlocks.

I'm using SQL Server 2008 R2.

From Management Studio I execute:

begin transaction
<my query>
exec sp_lock
rollback transaction

In the output I see interesting information about which locks are acquired, but:

- are this locks ordered by the time they're acquired? That is, can I be sure that lock at row n is acquired before lock at row n+1?
- if not, how can I get this information?

View 4 Replies View Related

SQL2005 SP2x64 With Vista Business 64 - MSP Error: 29504 - Access Denied Analyzing Sysdbupg.sql

Dec 25, 2007

Hello,
I have successfully installed two instances SQL Server 2005 Standard Ed. 64. and integration services (for the MSSQLSERVER instance).
When I try to install SP2 x64 everything exept the Database services of the MSSQLSERVER instance was updated well.

Here is the part of the inst.summary:

Time: 12/25/2007 13:09:26.420
KB Number: KB921896
Machine: xxxxxxx
OS Version: Professional (Build 6000)
Package Language: 1031 (DEU)
Package Platform: x64
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
Cluster Installation: No

**********************************************************************************
Prerequisites Check & Status
SQLSupport: Passed

**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Unterstützungsdateien für das Setup DEU 9.2.3042 x64
Datenbankdienste (AUTODESKVAULT) DEU SP2 2005.090.3042.00 x64 STANDARD
Datenbankdienste (MSSQLSERVER) DEU SP2 2005.090.3042.00 x64 STANDARD
Integration Services DEU SP2 9.00.3042.00 x64 STANDARD
SQL Server Native Client DEU 9.00.3042.00 x64
Clientkomponenten DEU SP2 9.2.3042 x64 STANDARD
SQLXML4 DEU 9.00.3042.00 x64
Abwärtskompatibilität DEU 8.05.2004 x64
Microsoft SQL Server VSS Writer DEU 9.00.3042.00 x64

----------------------------------------------------------------------------------
Product : Datenbankdienste (MSSQLSERVER)
Product Version (Previous): 3042
Product Version (Final) :
Status : Fehler
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 29504
Error Description : MSP Error: 29504 SQL Server-Setupfehler beim Analysieren von SQL-Skript 'c:ProgrammeMicrosoft SQL ServerMSSQL.1MSSQLInstallsysdbupg.sql'. Fehlercode: Zugriff verweigert
. Beheben Sie das Problem, und führen Sie dann das SQL Server-Setup erneut aus, um den Vorgang fortzusetzen.
----------------------------------------------------------------------------------


Any ideas ? Olaf

View 3 Replies View Related

PAGEIOLATCH_SH Wait

Aug 1, 2000

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.

View 1 Replies View Related

Event Wait

Jan 15, 2008

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

View 3 Replies View Related

Wait For A Response?

Jun 11, 2007

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.

View 4 Replies View Related

Wait Problem...

Dec 11, 2007

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

Messy in my head€¦ Help please

My second server have

CLR with 50% in the historial wait. Rest in Sleep

My first server have
99% in sleep wait category.




View 6 Replies View Related

Table Stats

Jan 5, 2004

Hi all,

I would like to create a stored procedure that will get the statistics of all the table in my database.

e.g.
Get the record count of each table in the database

Please help me.
Thanks in advance.

View 6 Replies View Related

SQL Server Stats

Oct 19, 2001

Does anyone know of a tried and tested method for collating stats from SQL Server databases. I have a no. of databases hosted on a single server, servicing a no. of applications. I need to find out the following:
CPU usage of each application on the server
Memory usage of each application
etc

Thanks

View 1 Replies View Related

Update Stats

Aug 11, 2004

Is it true that Update Statistics perform record commits if a query is outstanding?

View 4 Replies View Related

Update Stats

Aug 8, 2007

Has anyone noticed a performance improvement during trading hours when they replaced sp_updatestats with UPDATE STATISTICS FULLSCAN in their nightly maintenance?
Or is it negligible?

View 6 Replies View Related

Analze Stats

Nov 10, 2007

Hi pals,

Basically i am from Oracle background. I need some help.
In oracle we gather the statistics of a table as
SQL> analyze table <tname> compute statistics for all indexes;

or
SQL> EXEC DBMS_STATS.gather_schema_stats('SCOTT')

I want to gather statistics for a particular database say."pubs" for example.

How to do that?

Any suggestions are appreciated.

Thanks.
Franky

View 1 Replies View Related

SQL Stats In A Form

Jul 20, 2005

Hi there...How do I get to extract info like, current Database logged in user orgeneral stats like, ram usage... etc etc etc into a form if I use MicrosoftAccess 2002 for my forms application?Thanks in advanceRudi

View 1 Replies View Related

Getting Database Stats

Jul 20, 2005

COuld someone tell me if its possible to get hold of stats about allDatabases on a SQL Server.The sort of things I would like areName of DBLocation of DBSize of DBLocation of LogfileSize of DBOwnerUsers Authorised to access the DBIs there something that can do thisThanksDerrick

View 2 Replies View Related

Resetting DMV Stats

Feb 1, 2008

Hello all-
Is it possible to reset the values of DMV stats/counters without restarting the SQL service? I'm looking for something more than dbcc freeproccache...more along the lines of index_usage and some of the OS DMVs.

Cheers,
-Brandon Tucker

View 3 Replies View Related

Auto Stats

Apr 10, 2008



Hi all,
I have an dtsx (SSIS) for "clone" manually Sql server database to another.

How I copy all stats from one database to another ? I have problem with "auto stats".

When I try DROP statitics for auto stats I get this error:

No se puede DROP el índice 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'. No es una colección de estadísticas.

Cannot DROP index 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'. Not statitics collection.


What can I do ??


-- Get Stats list
SELECT
'[' + SCHEMA_NAME(tbl.schema_id) + '].[' + tbl.name + ']' AS [Table_Name_With_Schema],
'[' + st.name + ']' AS [Name],
'' + SCHEMA_NAME(tbl.schema_id) + '.' + tbl.name + ''
+ '.' + st.name + '' AS [Estadistica]
FROM
sys.tables AS tbl
INNER JOIN sys.stats st ON st.object_id=tbl.object_id
ORDER BY
[Table_Name_With_Schema] ASC,[Name] ASC


Thanks in advance, any help will be appreciated, regards, greetings

View 1 Replies View Related

Getting CPU And I/O Stats From Several Sql Servers

Nov 3, 2006

Hello ,

I would like a script for MSSQL 2000 for collection of utilization data for cpu and ram. I need to have the data from several servers.

This data for all servers should be stored in a database. I am looking for 10 minute increments.

How can I go about this.

Thanks

View 1 Replies View Related

Auto Stats

Apr 10, 2008

Hi all,
I have an dtsx (SSIS) for "clone" manually Sql server database to another.

How I copy all stats from one database to another ? I have problem with "auto stats".

When I try DROP statitics for auto stats I get this error:

No se puede DROP el índice 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'. No es una colección de estadísticas.

Cannot DROP index 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'. Not statitics collection.


What can I do ??


-- Get Stats list
SELECT
'[' + SCHEMA_NAME(tbl.schema_id) + '].[' + tbl.name + ']' AS [Table_Name_With_Schema],
'[' + st.name + ']' AS [Name],
'' + SCHEMA_NAME(tbl.schema_id) + '.' + tbl.name + ''
+ '.' + st.name + '' AS [Estadistica]
FROM
sys.tables AS tbl
INNER JOIN sys.stats st ON st.object_id=tbl.object_id
ORDER BY
[Table_Name_With_Schema] ASC,[Name] ASC


Thanks in advance, any help will be appreciated, regards, greetings

View 3 Replies View Related

Sysprocesses Says: Wait Forever

Sep 30, 2004

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.

What should I do?

View 6 Replies View Related

Wait Type: NETWORKIO

Jan 14, 2005

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?

View 5 Replies View Related

NETWORKIO - Wait Type

Sep 29, 2006

Hello, my first post??

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved