Link to home
Start Free TrialLog in
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 ?
Avatar of David Todd
David Todd
Flag of New Zealand image

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
PS It is extent fragmentation, not external ...

An extent is a related group of 8 pages.
ASKER CERTIFIED SOLUTION
Avatar of David Todd
David Todd
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK
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
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
Avatar of AXISHK

ASKER

Tks