Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

view behind xp_readerrorlog

Posted on 2011-09-19
7
Medium Priority
?
465 Views
Last Modified: 2012-05-12
is it possible to know which system proc/view works behind xp_readerrorlog?
0
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 5

Author Comment

by:25112
ID: 36563958
we are able to filter on this .. hence i would think there is a system table or view that is being used with a where condition..

example..
look at bottom example of
http://www.mssqltips.com/sqlservertip/1476/reading-the-sql-server-log-files-using-tsql/
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1336 total points
ID: 36564122
>>is it possible to know which system proc/view works behind xp_readerrorlog? <<
There is none.  It is an undocumented extended Stored Procedure to read text files.
0
 
LVL 10

Expert Comment

by:Ramesh Babu Vavilla
ID: 36564939
create proc sys.sp_readerrorlog(  
 @p1  int = 0,  
 @p2  int = NULL,  
 @p3  varchar(255) = NULL,  
 @p4  varchar(255) = NULL)  
as  
begin  
 
 if (not is_srvrolemember(N'securityadmin') = 1)  
 begin  
    raiserror(15003,-1,-1, N'securityadmin')  
    return (1)  
 end  
   
 if (@p2 is NULL)  
  exec sys.xp_readerrorlog @p1  
 else  
  exec sys.xp_readerrorlog @p1,@p2,@p3,@p4  
end  
 

check this out

0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 10

Assisted Solution

by:Ramesh Babu Vavilla
Ramesh Babu Vavilla earned 664 total points
ID: 36564953
internally xp_readerror user xpstar.dll for collecting the error log,
0
 
LVL 5

Author Comment

by:25112
ID: 36576893
>>There is none.  It is an undocumented extended Stored Procedure to read text files.

OK.. It is very interesting concept why the internals filters on text file thrugh a dll..

from what you understand, how do you see it filtering (like WHERE clause) on a text file? -so quickly...
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 1336 total points
ID: 36577536
>>from what you understand, how do you see it filtering (like WHERE clause) on a text file?<<
Why is that so strange?  It is no doubt written in C++, since doing it in T-SQL would be horrendously slow.
0
 
LVL 5

Author Comment

by:25112
ID: 36577560
ah.. very good answer...
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question