February 4, 2021 at 11:25 am
Are the SQL Server "Error Logs" (residing under SQL Server Agent) backed up? (eg. when the master or msdb DB's are backed up)?
We have a requirement to provide recoverability for these logs in the event a hacker should gain access and clean their trail.
February 4, 2021 at 7:05 pm
Nope, not unless you do it yourself in some way.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
February 5, 2021 at 1:26 pm
thx Scott.. yep, I now understand the location for the SQL “Error Logs” -- which is established at SQL install time (99% of the time we use the default location of C:\Program Files\Microsoft SQL Server\MSSQLversion…\MSSQL\Log\) for over 200 instances we have..
I'll need to develop a separate backup strategy to copy the error log files off at specific intervals -- maybe once a day. (too bad our Ola H solution doesn't do that) I've been doing SQL Admin for quite a while but never looked into the location of the 'Error Logs' .. Learn something new everyday! thx again.
February 5, 2021 at 1:54 pm
By itself, it is not saved, but you can find special services and applications that will save everything automatically.
February 6, 2021 at 11:16 pm
Instead of farting around with files, build a database to hold the error logs in tables and do something like what the fellow at the following link did.
https://www.mlakartechtalk.com/how-to-load-sql-server-error-log-into-table-for-analysis/
You could use one table or many tables. Pick your poison.
The cool part then is that it could be backed up like any other database and it will be much easier to do analysis of various errors. For example, you could do a pretty slick deadlock report, which is particularly useful when you make an improvement to fix some deadlocks (did it actually work?) or clearly demonstrate that deadlocks went up after a given code release, etc, ad infinitum.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply