July 1, 2013 at 5:38 am
Is there any way I can read the number of records in the errorlog without reading the output of xp_readerrorlog into a temp table / table variable?
I suspect not, I would just have liked to avoid the unnecessary processing.
Thanks.
July 1, 2013 at 8:36 am
You could check the file's size and according to the size decide if it should be cycled or not. Take into consideration that you'll need to work with xp_cmdshell and dir in order to do that (which can be a problem in some environments). In any case I don't think that you should be worried with inserting the results of sp_readerrorlog into temporary table. It takes about 1 second and I assume that you won't do it all the time.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy