Frag levels sql 2005

Posted on 2012-08-29
Last Modified: 2012-09-14
Need the best script to check fragmentation levels on a SQl 2005 database.  I have picked 1 or 2 scripts online and they give me different fragmentation levels.
Question by:Nana Hemaa
    LVL 29

    Assisted Solution

    by:Rich Weissler
    There are multiple different types of fragmentation possible.  Have you already read this blog on MSDN?  It also gives links to locations to get scripts to fix fragmentation issues.

    The scripts you already have could be giving you different values for your current fragmentation because they could be measuring different things which are both called fragmentation... or because there isn't a 'standard' defined for reporting it... it could be a difference in calculation.
    LVL 37

    Accepted Solution

    As you're asking about fragmentation, I'm assuming you'll also want to get rid of it as much as possible/needed?  Have a look at the following script by Michelle Ufford, you'll most likely find it useful:

    Also check out the following article by colleague-expert mark_wills:

    Another good write-up on fragmentation (contains interesting links) is the following blog post by Brent Ozar:
    LVL 75

    Expert Comment

    by:Anthony Perkins
    The following script does not report the fragmentation, but rather reindexes/reorganizes based on the fragmentation level:

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how the fundamental information of how to create a table.

    730 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

    15 Experts available now in Live!

    Get 1:1 Help Now