Re: Security Audit
- From: raizen <raizen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Aug 2008 09:40:04 -0700
Dear Roy,
Thank you for replying. I have done exactly what you told me with
additional steps:
1) Created a scheduled job to do following every sunday at 12:00am:
a) Run: EXEC sp_readerrorlog 1, 'C:\Program Files\Microsoft SQL
Server\MSSQL$HMMGPS01\LOG\errorlog', 'Login failed'
Then append the result to "Failed Logins.txt"
b) Recycle the Error Log by executing exec sp_cycle_errorlog;
I tested the above schedule job and it did exactly what I wanted to. Now We
don't need to even open the SQL server log.
Thank you for your assistance.
"Roy Harvey (SQL Server MVP)" wrote:
On Thu, 31 Jul 2008 15:30:09 -0700, raizen.
<raizen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Dear Roy,
Thank you for your quick response. I have few questions:
1) When you reconfigure the default amount of log files (6), do I need to
restart SQL server?
No, you do not need to restart SQL Server.
2) How does SQL server determine when to recycle the log files? Is there a
way to recyle every Sunday for example?
SQL Server starts a new log file every time it starts up. By default
that is the ONLY time it starts a new log. If you want to force a new
log, say on Sunday, set up a job using SQL Server Agent to execute
sp_cycle_errorlog.
At one time the number of log files SQL Server kept was not
configurable. Since I want to keep that data indefinitely I set up a
stored procedure that ran each time SQL Server started; the proc
copied the previous log file to another name so that we would have a
copy that SQL Server would not delete. Thinks are much simpler today!
Roy Harvey
Beacon Falls, CT
- References:
- Re: Security Audit
- From: raizen
- Re: Security Audit
- From: Roy Harvey (SQL Server MVP)
- Re: Security Audit
- Prev by Date: Re: Unable to connect to SQL 2005 with Windows Authentication via IP
- Next by Date: Re: Error 15401 - Windows NT user or group 'tropicaldba\SQLAccessGroup
- Previous by thread: Re: Security Audit
- Next by thread: Unable to connect to SQL 2005 with Windows Authentication via IP
- Index(es):
Relevant Pages
|