Oui, il y a un moyen
La table pour stocker les résultats du déclencheur
USE [SOME_DATABASE]
GO
CREATE TABLE [dbo].[ddl_objects_log](
[date] [datetime] NULL DEFAULT (getdate()),
[login_name] [nvarchar](128) NULL,
[nt_user_name] [nvarchar](128) NULL,
[program_name] [nvarchar](128) NULL,
[host_name] [nvarchar](128) NULL,
[text] [xml] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
Le déclencheur
USE [SOME_DATABASE]
GO
/****** Object: DdlTrigger [ddl_db_trigger] Script Date: 22/01/2015 13:41:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [ddl_db_trigger]
ON DATABASE
FOR CREATE_FUNCTION,
CREATE_PROCEDURE,
CREATE_TABLE,
CREATE_TRIGGER,
CREATE_VIEW,
ALTER_FUNCTION,
ALTER_PROCEDURE,
ALTER_TABLE,
ALTER_TRIGGER,
ALTER_VIEW,
DROP_FUNCTION,
DROP_PROCEDURE,
DROP_TABLE,
DROP_TRIGGER,
DROP_VIEW,
CREATE_INDEX,
ALTER_INDEX,
DROP_INDEX
AS
BEGIN
set nocount ON
insert into ddl_objects_log(login_name, nt_user_name, program_name, host_name, text)
select login_name, nt_user_name, program_name, host_name, EVENTDATA() from sys.dm_exec_sessions WITH(NOLOCK) where session_id=@@SPID
set nocount OFF
END
GO
ENABLE TRIGGER [ddl_db_trigger] ON DATABASE
GO
La requête pour auditer les résultats du déclencheur
USE [SOME_DATABASE]
GO
SELECT top 10
REPLACE(CONVERT(VARCHAR(250), text.query('data(/EVENT_INSTANCE/PostTime)')),'T', ' ') as modify_datetime,
CONVERT(VARCHAR(215), text.query('data(/EVENT_INSTANCE/EventType)')) as event_type,
CONVERT(VARCHAR(225), text.query('data(/EVENT_INSTANCE/ServerName)')) as server_name,
CONVERT(VARCHAR(225), text.query('data(/EVENT_INSTANCE/DatabaseName)')) as database_name,
CONVERT(VARCHAR(225), text.query('data(/EVENT_INSTANCE/ObjectType)')) as object_type,
CONVERT(VARCHAR(225), text.query('data(/EVENT_INSTANCE/ObjectName)')) as object_name,
CONVERT(VARCHAR(215), text.query('data(/EVENT_INSTANCE/UserName)')) as user_name,
Login_name,
CONVERT(VARCHAR(MAX), text.query('data(/EVENT_INSTANCE/TSQLCommand/CommandText)')) as command_text
FROM [SOME_DATABASE].[dbo].[ddl_objects_log]
where CONVERT(VARCHAR(225), text.query('data(/EVENT_INSTANCE/ObjectName)')) like '%SOME_STORED_PROCEDURE%'
order by date desc
GO
Un autre administrateur de base de données peut avoir une opinion différente, mais je considère que la disponibilité de ces informations est importante pour un administrateur de base de données.