Home » SQL Server » xp_readerrorlog V/S sp_readerrorlog parameters in SQL Server 2012

xp_readerrorlog V/S sp_readerrorlog parameters in SQL Server 2012

The parameters syntax has been changed in SQL Server 2012 but not documented yet.

Syntax Before SQL Server 2012 SQL Server 2012
sp_readerrorlog 0,1,’node’ Supported Supported
xp_readerrorlog 0,1, ‘node’

 

 

xp_readerrorlog 0,1,N’node’

Supported

 

 

 

Supported

Not Supported

Msg 22004, Level 12, State 1, Line 0

Error executing extended stored procedure: Invalid Parameter Type

 

Supported. It seems xp_readerrorlog need Nvercarchar parameter.

sp_readerrorlog 0,1, “node” Supported Supported
xp_readerrorlog 0,1,”node” Supported Supported

Parameters defined

· Parameter 1 (int), is the number of the log file you want to read, default is “0” for current log. The extended stored procedure xp_enumerrorlogs will come in handy in determining what SQL server error logs or SQL server Agent logs exist and when they were created. NOTE: extended stored procedure xp_enumerrorlogs parameter (1) works just like xp_ReadErrorLog parameter (2). A value of 1 shows available SQL error logs and a value of 2 shows Agent logs. The default value is 0.

· Parameter 2 (int), value of 1 reads SQL error logs, value of 2 reads SQL Server Agent logs, with a default value of 1

· Parameter 3 varchar (255), is a search string for the log entry, with a default value of NULL

· Parameter 4 varchar (255), is another search string for the log entry, with a default value of NULL


8 Comments

  1. Daline says:

    thank you for your advice

  2. I have been exploring for a bit for any high quality articles or blog posts in this sort of area . Exploring in Yahoo I eventually stumbled upon this website. Studying this information So i am happy to exhibit that I have an incredibly excellent uncanny feeling I came upon just what I needed. I so much for sure will make sure to don?t omit this website and give it a look regularly.

  3. I like the helpful info you supply for your articles. I will bookmark your weblog and check again here regularly. I’m quite certain I will be informed many new stuff proper right here! Good luck for the following!

  4. hello there and thank you to your information ? I’ve certainly picked up something new from proper here. I did then again expertise several technical issues the use of this website, as I experienced to reload the website a lot of instances prior to I could get it to load properly. I have been considering in case your hosting is OK? Now not that I’m complaining, but slow loading instances instances will often have an effect on your placement in google and could harm your high-quality score if advertising and marketing with Adwords. Anyway I’m including this RSS to my e-mail and could look out for a lot extra of your respective exciting content. Ensure that you replace this again soon..

  5. I do not even know the way I finished up here, however I believed this publish used to be good. I don’t realize who you’re but definitely you are going to a well-known blogger in the event you aren’t already. Cheers!

  6. repriser says:

    use nvarchar type N’node’

  7. repriser says:

    supported, not a bug,
    use 0,1, N’node’

Leave a Reply

Join us on Facebook

microsoftcommunitycontributor
%d bloggers like this: