Grille12 (grille12 (AT) gmail (DOT) com) writes:
Quote:
I am trying to add to the default SQL server log file (in the section
/Management/SQL Server Logs from Management Studio) the command drop
database but in vain.
I used the command
exec sp_altermessage 13087 , with_log, true
to modify the existing message whose text value is drop but it does not
change anything when I drop a database.
Is this possible to add the command drop database in the existing default
logs? |
I would say that was a most mysterious message. I don't know when/if
13087 is generated, but may it not be when a database is dropped.
You could set up a DDL-trgger on server level for DROP_DATABASE which
performs a RAISEEROR WITH LOG to have a message written to the error log.
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx