On the production server when xp_readerrorlog cmd is run the size will show approx 500000 daily i have to recycle error logs the errorlogs contains messages of all the successful login and not successfull login details. i need both the information please suggest what i can do.
On the production server when xp_readerrorlog cmd is run the size will show approx
Share
If you’re capturing every single login and failed login into your error log along with all the other stuff that gets written to the error log, then your error log is just going to grow and there’s nothing you can do about that.
If you need to capture logins and you’re using SQL Server 2008 or better, I’d suggest taking a look at Extended Events. This will output to a different file, which you’ll still have to manage, but it won’t be filling up your error logs.
For 2005 & earlier you can do similar work with a server-side trace, but it’s not as efficient as extended events. Here’s an article on how to set up a server-side trace from Gail Shaw.