April 24, 2014 at 9:42 am
Hi, my question maybe be silly but why a statement like drop database doesn't log and a statement like start SqlAgent service does ?
Thanks.
April 24, 2014 at 10:14 am
Log to where? SQL Server Log (ERRORLOG)?
Remember that you also have the default trace. Something (including create/drop database) gets logged there.
-- Gianluca Sartori
April 24, 2014 at 10:19 am
with trace ok but why doesn't log in ErrorLog ?
April 24, 2014 at 10:22 am
Not everything gets logged to ERRORLOG.
Something gets logged to the default trace, something gets logged to the system health session, something is not logged at all unless captured by audits or other means.
-- Gianluca Sartori
April 24, 2014 at 10:24 am
My question is why should it? It is captured by the default trace.
April 24, 2014 at 10:29 am
My question is why a start service like agent is logged and a drop database isn't ? Is there a sort of distinction between both statements ?
April 24, 2014 at 10:42 am
Lynn Pettis (4/24/2014)
My question is why should it? It is captured by the default trace.
Alexandre Araujo (4/24/2014)
My question is why a start service like agent is logged and a drop database isn't ? Is there a sort of distinction between both statements ?
I guess we could go on forever 🙂
-- Gianluca Sartori
April 24, 2014 at 10:53 am
it's an issue of scope;
the error log is targeted for things that affect the server itself; stops and starts, hardware errors,dropped connections, etc all appear there.
From a SQL standpoint, dropping a database is not an error, just a DDL event.
As a result,DDL events go into the default trace, or any other traces audits that are also watching for it, but ti's not an error, per se;
Lowell
April 24, 2014 at 12:29 pm
Lowell (4/24/2014)
As a result,DDL events go into the default trace, or any other traces audits that are also watching for it, but ti's not an error, per se;
Thanks.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply