^ Object ^ Description ^
SQLServer:Buffer Manager | Provides information about the memory buffers used by SQL Server |
---|---|
SQLServer:Databases | Provides information about a SQL Server database |
SQLServer:Locks | Provides information about individual lock requests |
SQLServer:Memory Manager | Provides information about SQL Server memory usage |
CREATE TRIGGER CreateTable ON DATABASE FOR CREATE_TABLE AS DECLARE @DATA XML DECLARE @DATABASE NVARCHAR (100) SET @DATA = eventdata() SET @DATABASE = @DATA.value('(/EVENT_INSTANCE/DatabaseName)[1]', 'nvarchar(100)') ......
SELECT name FROM sys.triggers SELECT definition FROM sys.sql_modules ...
ALTER TRIGGER CreateTable ON DATABASE FOR CREATE_TABLE AS ......
DROP TRIGGER CreateTable ON DATABASE
CREATE EVENT NOTIFICATION UpdateStats ON SERVER FOR UPDATE_STATISTICS TO SERVICE 'NotifyService', 'current database'
DECLARE @cmd nvarchar(1000) DECLARE @posttime nvarchar(24) DECLARE @spid nvarchar(6) SET @cmd = @messagebody.value ('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'nvarchar(100)') SET @messagebody.value ('(/EVENT_INSTANCE/PostTime)', 'nvarchar(24') SET @spid = @messagebody.value ('(/EVENT_INSTANCE/SPID)[1]', 'nvarchar(6)')
SELECT name FROM sys.event_notifications SELECT definition FROM sys.service_queues
DROP EVENT NOTIFICATION UpdateStats ON SERVER