Avatar of AXISHK
AXISHK
 asked on

SQL Server 2008 Query

Under SQL 2008, how to

- check internal & external index fragment ? I use the script below but it seems that it takes a long time to run ..
ref: http://gallery.technet.microsoft.com/scriptcenter/Check-SQL-Server-a-a5758043

- how to identify dead lock in SQL 2008 ? How do I know whether a dead lock occur in production environment ? Will the SQL server slow down the performance ?

- how can I identify a long running sql, procedure or jobs in SQL 2008 server ?
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
AXISHK

8/22/2022 - Mon
David Todd

Hi,

These are three separate questions.

1. The script
How long does it take to run? What size is the database in question?

Regards
  David
David Todd

PS It is extent fragmentation, not external ...

An extent is a related group of 8 pages.
ASKER CERTIFIED SOLUTION
David Todd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
AXISHK

ASKER
Wait for 1/2 hour but it doesn't return the result...

Is the query correct ? Is there some example on using the sys.dm_db_index_physical_stats ? eg. how to interpret the value and result ?

I will separate the #2 and 3rd question into separate thread. Tks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
David Todd

Hi,

Try on a smaller database first then.

Or if you follow the link I gave, you can specify the indexes of immediate interest.

Regards
  David
AXISHK

ASKER
Tks