Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SQL Server 2008 Query

Posted on 2014-01-14
6
406 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

838 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