Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

DDL Statements That Have Server or Database Scope

DDL triggers or event notifications can be created to fire in response to the following events
when they occur in the database in which the trigger or event notification is created, or anywhere
in the server instance.

DDL Statements That Have Server or Database Scope


CREATE_APPLICATION_ROL
E (Applies to the CREATE ALTER_APPLICATION_ROL DROP_APPLICATION_ROL
APPLICATION ROLE E (Applies to the ALTER E (Applies to the DROP
statement and sp_addapprole. If APPLICATION ROLE APPLICATION ROLE
a new schema is created, this statement and statement and
event also triggers a sp_approlepassword.) sp_dropapprole.)
CREATE_SCHEMA event.)
CREATE_ASSEMBLY ALTER_ASSEMBLY DROP_ASSEMBLY
CREATE_ASYMMETRIC_KE ALTER_ASYMMETRIC_KE
DROP_ASYMMETRIC_KEY
Y Y
ALTER_AUTHORIZATION_
DATABASE (Applies to the
ALTER AUTHORIZATION
ALTER_AUTHORIZATION
statement when ON
DATABASE is specified, and
sp_changedbowner.)
CREATE_BROKER_PRIORIT CREATE_BROKER_PRIORIT CREATE_BROKER_PRIORI
Y Y TY
CREATE_CERTIFICATE ALTER_CERTIFICATE DROP_CERTIFICATE
CREATE_CONTRACT DROP_CONTRACT
CREATE_CREDENTIAL ALTER_CREDENTIAL DROP_CREDENTIAL
GRANT_DATABASE DENY_DATABASE REVOKE_DATABASE
CREATE_DATABASE_AUDIT ALTER_DATABASE_AUDIT DENY_DATABASE_AUDIT_
_SPEFICIATION _SPEFICIATION SPEFICIATION
CREATE_DATABASE_ENCRY ALTER_DATABASE_ENCRY DROP_DATABASE_ENCRY
PTION_KEY PTION_KEY PTION_KEY
CREATE_DEFAULT DROP_DEFAULT
BIND_DEFAULT (Applies to UNBIND_DEFAULT (Applies
sp_bindefault.) to sp_unbindefault.)
CREATE_EVENT_NOTIFICAT DROP_EVENT_NOTIFICATI
ION ON
CREATE_EXTENDED_PROPE ALTER_EXTENDED_PROPE DROP_EXTENDED_PROPE
RTY (Applies to RTY (Applies to RTY (Applies to
sp_addextendedproperty.) sp_updateextendedproperty.) sp_dropextendedproperty.)
CREATE_FULLTEXT_CATAL ALTER_FULLTEXT_CATAL DROP_FULLTEXT_CATALO
OG (Applies to the CREATE OG (Applies to the ALTER G (Applies to the DROP
DDL Statements That Have Server or Database Scope
FULLTEXT CATALOG
statement, sp_fulltextcatalog
FULLTEXT CATALOG FULLTEXT CATALOG
when start_incremental,
statement and statement and
start_full, Stop, or Rebuild is
sp_fulltextcatalog when create sp_fulltextcatalog when drop
specified, and
is specified.) is specified.)
sp_fulltext_database when
enable is specified.)
ALTER_FULLTEXT_INDEX
(Applies to the ALTER
FULLTEXT INDEX statement,
CREATE_FULLTEXT_INDEX DROP_FULLTEXT_INDEX
sp_fulltextcatalog when
(Applies to the CREATE (Applies to the DROP
start_full, start_incremental, or
FULLTEXT INDEX statement FULLTEXT INDEX statement
stop is specified,
and sp_fulltexttable when and sp_fulltexttable when
sp_fulltext_column, and
create is specified.) drop is specified.)
sp_fulltext_table when any
action other than create or drop
is specified.)
CREATE_FULLTEXT_STOPLI ALTER_FULLTEXT_STOPLI DROP_FULLTEXT_STOPLIS
ST ST T
CREATE_FUNCTION ALTER_FUNCTION DROP_FUNCTION
ALTER_INDEX (Applies to
CREATE_INDEX the ALTER INDEX statement DROP_INDEX
and sp_indexoption.)
CREATE_MASTER_KEY ALTER_MASTER_KEY DROP_MASTER_KEY
CREATE_MESSAGE_TYPE ALTER_MESSAGE_TYPE DROP_MESSAGE_TYPE
CREATE_PARTITION_FUNCT ALTER_PARTITION_FUNCT DROP_PARTITION_FUNCTI
ION ION ON
CREATE_PARTITION_SCHE ALTER_PARTITION_SCHEM DROP_PARTITION_SCHEM
ME E E
ALTER_PLAN_GUIDE
DROP_PLAN_GUIDE
(Applies to
CREATE_PLAN_GUIDE (Applies to
sp_control_plan_guide when
(Applies to sp_control_plan_guide when
ENABLE, ENABLE ALL,
sp_create_plan_guide.) DROP or DROP ALL is
DISABLE, or DISABLE ALL
specified.)
is specified.)
ALTER_PROCEDURE
(Applies to the ALTER
CREATE_PROCEDURE DROP_PROCEDURE
PROCEDURE statement and
sp_procoption.)
CREATE_QUEUE ALTER_QUEUE DROP_QUEUE
CREATE_REMOTE_SERVICE ALTER_REMOTE_SERVICE DROP_REMOTE_SERVICE_
_BINDING _BINDING BINDING
CREATE_SPATIAL_INDEX
RENAME (Applies to
DDL Statements That Have Server or Database Scope
sp_rename)
DROP_ROLE (Applies to the
CREATE_ROLE (Applies to the
DROP ROLE statement,
CREATE ROLE statement, ALTER_ROLE
sp_droprole, and
sp_addrole, and sp_addgroup.)
sp_dropgroup.)
ADD_ROLE_MEMBER DROP_ROLE_MEMBER
CREATE_ROUTE ALTER_ROUTE DROP_ROUTE
CREATE_RULE DROP_RULE
BIND_RULE (Applies to UNBIND_RULE (Applies to
sp_bindrule.) sp_unbindrule.)
CREATE_SCHEMA (Applies to
ALTER_SCHEMA (Applies to
the CREATE SCHEMA
the ALTER SCHEMA
statement, sp_addrole, DROP_SCHEMA
statement and
sp_adduser, sp_addgroup, and
sp_changeobjectowner.)
sp_grantdbaccess.)
CREATE_SEARCH_PROPERT ALTER_SEARCH_PROPERT DROP_SEARCH_PROPERT
Y_LIST Y_LIST Y_LIST
CREATE_SEQUENCE_EVEN CREATE_SEQUENCE_EVEN CREATE_SEQUENCE_EVE
TS TS NTS
CREATE_SERVER_ROLE ALTER_SERVER_ROLE DROP_SERVER_ROLE
CREATE_SERVICE ALTER_SERVICE DROP_SERVICE
ALTER_SERVICE_MASTER_ BACKUP_SERVICE_MASTE RESTORE_SERVICE_MAST
KEY R_KEY ER_KEY
ADD_SIGNATURE (for
signature operations on non-
DROP_SIGNATURE
schema scoped objects;
database, assembly, trigger)
ADD_SIGNATURE_SCHEMA
_OBJECT (for schema scoped DROP_SIGNATURE_SCHEM
objects; stored procedures, A_OBJECT
functions)
ALTER_INDEX can be used DROP_INDEX can be used
CREATE_SPATIAL_INDEX
for spatial indexes. for spatial indexes.
CREATE_STATISTICS DROP_STATISTICS UPDATE_STATISTICS
CREATE_SYMMETRIC_KEY ALTER_SYMMETRIC_KEY DROP_SYMMETRIC_KEY
CREATE_SYNONYM DROP_SYNONYM
ALTER_TABLE (Applies to
CREATE_TABLE the ALTER TABLE statement DROP_TABLE
and sp_tableoption.)
ALTER_TRIGGER (Applies to
the ALTER TRIGGER
CREATE_TRIGGER DROP_TRIGGER
statement and
sp_settriggerorder.)
DDL Statements That Have Server or Database Scope
CREATE_TYPE (Applies to the DROP_TYPE (Applies to the
CREATE TYPE statement and DROP TYPE statement and
sp_addtype.) sp_droptype.)
CREATE_USER (Applies to the DROP_USER (Applies to the
ALTER_USER (Applies to
CREATE USER statement, DROP USER statement,
ALTER USER statement and
sp_adduser, and sp_dropuser, and
sp_change_users_login.)
sp_grantdbaccess.) sp_revokedbaccess.)
CREATE_VIEW ALTER_VIEW DROP_VIEW
ALTER_INDEX can be used DROP_INDEX can be used
CREATE_XML_INDEX
for XML indexes. for XML indexes.
CREATE_XML_SCHEMA_CO ALTER_XML_SCHEMA_CO DROP_XML_SCHEMA_COL
LLECTION LLECTION LECTION

DDL Statements That Have Server Scope


DDL triggers or event notifications can be created to fire in response to the following events
when they occur anywhere in the server instance.

DDL Statements That Have Server Scope


ALTER_INSTANCE (Applies
ALTER_AUTHORIZATION_S ALTER_SERVER_CONFIGU to sp_configure and
ERVER RATION sp_addserver when a local
server instance is specified.)
CREATE_AVAILABILITY_GR ALTER_AVAILABILITY_GR DROP_AVAILABILITY_GR
OUP OUP OUP
CREATE_CREDENTIAL ALTER_CREDENTIAL DROP_CREDENTIAL
CREATE_CRYPTOGRAPHIC_ ALTER_CRYPTOGRAPHIC_ DROP_CRYPTOGRAPHIC_P
PROVIDER PROVIDER ROVIDER
ALTER_DATABASE (Applies
to the ALTER DATABASE
CREATE_DATABASE DROP_DATABASE
statement and
sp_fulltext_database.)
CREATE_ENDPOINT ALTER_ENDPOINT DROP_ENDPOINT
CREATE_EVENT_SESSION ALTER_EVENT_SESSION DROP_EVENT_SESSION
CREATE_EXTENDED_PROC DROP_EXTENDED_PROCE
EDURE (Applies to DURE (Applies to
sp_addextendedproc.) sp_dropextendedproc.)
DROP_LINKED_SERVER
CREATE_LINKED_SERVER
ALTER_LINKED_SERVER (Applies to sp_dropserver
(Applies to
(Applies to sp_serveroption.) when a linked server is
sp_addlinkedserver.)
specified.)
CREATE_LINKED_SERVER_ DROP_LINKED_SERVER_L
LOGIN (Applies to OGIN (Applies to
DDL Statements That Have Server Scope
sp_addlinkedsrvlogin.) sp_droplinkedsrvlogin.)
CREATE_LOGIN (Applies to ALTER_LOGIN (Applies to
the CREATE LOGIN statement, the ALTER LOGIN statement, DROP_LOGIN (Applies to the
sp_addlogin, sp_grantlogin, sp_defaultdb, DROP LOGIN statement,
xp_grantlogin, and sp_defaultlanguage, sp_droplogin,
sp_denylogin when used on a sp_password, and sp_revokelogin, and
nonexistent login that must be sp_change_users_login when xp_revokelogin.)
implicitly created.) Auto_Fix is specified.)
CREATE_MESSAGE (Applies ALTER_MESSAGE (Applies DROP_MESSAGE (Applies
to sp_addmessage.) to sp_altermessage.) to sp_dropmessage.)
CREATE_REMOTE_SERVER ALTER_REMOTE_SERVER DROP_REMOTE_SERVER
(Applies to sp_addserver.) (Applies to sp_setnetname.) (Applies to sp_dropserver
when a remote server is
specified.)
CREATE_RESOURCE_POOL ALTER_RESOURCE_POOL DROP_RESOURCE_POOL
GRANT_SERVER DENY_SERVER REVOKE_SERVER
ADD_SERVER_ROLE_MEMB DROP_SERVER_ROLE_ME
ER MBER
CREATE_SERVER_AUDIT ALTER_SERVER_AUDIT DROP_SERVER_AUDIT
CREATE_SERVER_AUDIT_SP ALTER_SERVER_AUDIT_SP DROP_SERVER_AUDIT_SP
ECIFICATION ECIFICATION ECIFICATION
CREATE_WORKLOAD_GRO ALTER_WORKLOAD_GROU
DROP_WORKLOAD_GR
UP P

You might also like