Re: Security Audit



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

.



Relevant Pages

  • RE: Installing SP4 on SQL 2000
    ... tomorrow to see where the log files are. ... SQL Server 2000 SP4 is 8.00.2039. ... MCITP: Database Administrator ... "David G" wrote: ...
    (microsoft.public.sqlserver.setup)
  • RE: Installing SP4 on SQL 2000
    ... Another place to check for install log files is in C:\Program ... MCITP: Database Administrator ... "David G" wrote: ... should I have SQL Server on? ...
    (microsoft.public.sqlserver.setup)
  • RE: How to change the error log location?
    ... for any SQL Server 7.0 or SQL Server 2000 database. ... Change the path for the master data and log files in SQL Server Enterprise ... -d is the fully qualified path for the master database data file. ...
    (microsoft.public.sqlserver.server)
  • Re: Advice Requested : Disaster Recovery with 2 Drives (No Raid) with SQL Server 2008
    ... As far as splitting the transaction log files and the data files, that's always a good strategy, but for a 1.3GB database... ... I am running SQL Server 2008 Enterprise, ... backups every 4 hours to one of the two Drives. ...
    (microsoft.public.sqlserver.programming)
  • Re: Recovering using the log file
    ... Stop that SQL Server, delete the mdf, ndf and ldf files. ... Then restore the db backup and that log backups. ... > They were in full recovery. ... > full backups and log files that I have. ...
    (microsoft.public.sqlserver.server)