Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSQL syntax highlighing error #145

Open
GiganteX opened this issue Jun 30, 2022 · 1 comment
Open

TSQL syntax highlighing error #145

GiganteX opened this issue Jun 30, 2022 · 1 comment

Comments

@GiganteX
Copy link

This code block is formatted incorrectly. It's all red...

image

<code tsql>
-- Lists index fragmentation data for a single database
SELECT  '[' + DB_NAME() + '].[' + OBJECT_SCHEMA_NAME(ddips.[object_id],
                                                    DB_ID()) + '].['
        + OBJECT_NAME(ddips.[object_id], DB_ID()) + ']' AS [Object] ,
        i.[name] AS [Index] ,
        ddips.[index_type_desc] AS [Index Type],
        ddips.[partition_number] AS [Partition Number],
        ddips.[alloc_unit_type_desc] AS [Allocation Unit Type],
        ddips.[index_depth] AS [Index Depth],
        ddips.[index_level] AS [Index Level],
        CAST(ddips.[avg_fragmentation_in_percent] AS SMALLINT)
            AS [Average Fragmentation (%)] ,
        CAST(ddips.[avg_fragment_size_in_pages] AS SMALLINT)
            AS [Average Fragment Size (pages)] ,
        ddips.[fragment_count] AS [Fragments],
        ddips.[page_count] AS [Pages]
FROM    sys.dm_db_index_physical_stats(DB_ID(), NULL,
                                         NULL, NULL, 'limited') ddips
        INNER JOIN sys.[indexes] i ON ddips.[object_id] = i.[object_id]
                                       AND ddips.[index_id] = i.[index_id]
WHERE   ddips.[avg_fragmentation_in_percent] > @fragmentation
        AND ddips.[page_count] > @pages
ORDER BY ddips.[avg_fragmentation_in_percent] ,
        OBJECT_NAME(ddips.[object_id], DB_ID()) ,
        i.[name]
</code>
@Klap-in
Copy link

Klap-in commented Jul 1, 2022

Is related to #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants