SQL Event Action ID and Class Type for Create and Drop Index showing Wrong

Rathish S 40 Reputation points
2023-03-23T12:59:26.5966667+00:00

SQL Server 2022

Tool : SQL Server Management Studio Version 19

Windows Version : 10

Hi Team,

Please help me on the below Query

Query: SQL Event Action ID and Class Type for Create and Drop Index shows AL (Expected Action ID=CR) and U (Expected class type=IX), Please help on why the action id is coming as AL instead of CR and Class type IX instead of U

Screenshots attached below

Create Index Action Id and Class type on Event Viewer

User's image

Drop Index Action Id and Class Type on Event Viewer

User's image

Thanks in Advance

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,614 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,702 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,798 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,452 questions
{count} votes

Accepted answer
  1. Seeya Xi-MSFT 16,436 Reputation points
    2023-03-24T01:45:39.09+00:00

    Hi @Rathish S,

    The Action ID and Class Type values in the Event Viewer for Create and Drop Index events are determined by the SQL Server engine and are based on the internal implementation of the CREATE INDEX and DROP INDEX statements.

    The Action ID for a Create Index event is AL, which stands for "Altered Object." This is because creating an index involves altering the structure of the table or view on which the index is being created. The expected Action ID value of CR may not be used because the SQL Server engine does not treat the creation of an index as a new object creation.

    The Class Type for a Create Index event is IX, which stands for "Index." The expected Class Type value of U (for "User-defined Table or View") may not be used because an index is not considered a user-defined table or view. Instead, it is considered a database object that is associated with a table or view.

    Similarly, the Action ID for a Drop Index event is also AL, and the Class Type is IX.

    Therefore, the values that you are seeing in the Event Viewer for Create and Drop Index events are expected based on the SQL Server engine's internal implementation.

    By the way, you should focus more on the Error Level event here.

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

0 additional answers

Sort by: Most helpful