Solved

SQL Server 2008 Query

Posted on 2014-01-14
6
398 Views
Last Modified: 2014-01-15
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 ?
0
Comment
Question by:AXISHK
  • 4
  • 2
6 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 39780683
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
0
 
LVL 35

Expert Comment

by:David Todd
ID: 39780706
PS It is extent fragmentation, not external ...

An extent is a related group of 8 pages.
0
 
LVL 35

Accepted Solution

by:
David Todd earned 500 total points
ID: 39780710
Hi,

I suggest you look up
http://technet.microsoft.com/en-us/library/ms188917.aspx, and dig into the dmv
dm_db_index_physical_stats a little more.

Regards
  David
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:AXISHK
ID: 39781389
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
0
 
LVL 35

Expert Comment

by:David Todd
ID: 39781494
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
0
 

Author Closing Comment

by:AXISHK
ID: 39784480
Tks
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now