Database Mirroring State Change Event Class
The Database Mirroring State Change event class indicates when the state of a mirrored database changes. Include this event class in traces that are monitoring conditions of mirrored databases.
When the Database Mirroring State Change event class is included in a trace the relative overhead is low. The overhead may be greater if the state of the mirrored databases increase.
Data Column Name
ID of the database specified by the USE database statement or the default database if no USE database statement has been issued for a given instance. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function.
Name of the mirrored database.
Type of event = 167.
Sequence of event class in batch.
Prior state ID.
Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user.
Security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server.
ID of the request containing the statement.
Name of the instance of Microsoft SQL Server being traced.
Login name of the user who originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1 and LoginName shows Login2. This column displays both SQL Server and Windows logins.
ID of the session on which the event occurred.
Time at which the event started, if available.
New mirroring state ID:
0 = Null Notification
1 = Synchronized Principal with Witness
2 = Synchronized Principal without Witness
3 = Synchronized Mirror with Witness
4 = Synchronized Mirror without Witness
5 = Connection with Principal Lost
6 = Connection with Mirror Lost
7 = Manual Failover
8 = Automatic Failover
9 = Mirroring Suspended
10 = No Quorum
11 = Synchronizing Mirror
12 = Principal Running Exposed
Description of the state change.
System-assigned ID of the transaction.