SQL Server event log 
Author Message
 SQL Server event log

I'm new to SQL Server and have a quick question on event
logs.  I'm trying to understand the following:

1) What SQL Server events appear in the Windows event log
(I'm assuming there is a list - but can't find it in the
doc)?

2) Are these events different from what appears in the SQL
Server logs (e.g. accessible in Enterprise Manager)?

3) How do I get programmatic access to the SQL Server
log?  I see the files in \Program Files\Microsoft SQL
Server\MSSQL\LOGS.  Not sure of the correct approach to
accessing them.

Thanks in advance.

Joe



Sat, 22 May 2004 04:50:37 GMT
 SQL Server event log

1) It depends on the severity level and the WITH LOG option for userdefined
RAISERROR TSQL statements. Jobs can also write success/failure to NT
Application Event Log
2) The SQL Error log usually contains more detailed information on errors
than the NT log. It can also produce more verbose output depending on any
Trace flags you might have set
3) You can open it with Notepad , view it in EM, view it in QA using
xp_readerrorlog lognum (omit the lognumber if you want to view current log -
you can get a list of errorlogs using xp_enumerrorlogs)

e.g. exec master..xp_readerrorlog

would return the current log
Or you can use the ReadErrorLog Method of a SQLServer Object

HTH
Jasper Smith


Quote:
> I'm new to SQL Server and have a quick question on event
> logs.  I'm trying to understand the following:

> 1) What SQL Server events appear in the Windows event log
> (I'm assuming there is a list - but can't find it in the
> doc)?

> 2) Are these events different from what appears in the SQL
> Server logs (e.g. accessible in Enterprise Manager)?

> 3) How do I get programmatic access to the SQL Server
> log?  I see the files in \Program Files\Microsoft SQL
> Server\MSSQL\LOGS.  Not sure of the correct approach to
> accessing them.

> Thanks in advance.

> Joe



Sat, 22 May 2004 08:29:40 GMT
 SQL Server event log

Quote:
> 1) It depends on the severity level and the WITH LOG option for userdefined
> RAISERROR TSQL statements. Jobs can also write success/failure to NT
> Application Event Log

Also, if a message has been configured to write to the log (mask on 128 in dlevel column in
sysmessages). Severity level 19 (I believe) and above are always written, regardless of dlevel.
To see the ones written with lower severity level:

SELECT *
 FROM master..sysmessages
 WHERE dlevel & 128 = 128
 AND severity < 19
ORDER BY severity, error

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sql...

Quote:

> 1) It depends on the severity level and the WITH LOG option for userdefined
> RAISERROR TSQL statements. Jobs can also write success/failure to NT
> Application Event Log
> 2) The SQL Error log usually contains more detailed information on errors
> than the NT log. It can also produce more verbose output depending on any
> Trace flags you might have set
> 3) You can open it with Notepad , view it in EM, view it in QA using
> xp_readerrorlog lognum (omit the lognumber if you want to view current log -
> you can get a list of errorlogs using xp_enumerrorlogs)

> e.g. exec master..xp_readerrorlog

> would return the current log
> Or you can use the ReadErrorLog Method of a SQLServer Object

> HTH
> Jasper Smith



> > I'm new to SQL Server and have a quick question on event
> > logs.  I'm trying to understand the following:

> > 1) What SQL Server events appear in the Windows event log
> > (I'm assuming there is a list - but can't find it in the
> > doc)?

> > 2) Are these events different from what appears in the SQL
> > Server logs (e.g. accessible in Enterprise Manager)?

> > 3) How do I get programmatic access to the SQL Server
> > log?  I see the files in \Program Files\Microsoft SQL
> > Server\MSSQL\LOGS.  Not sure of the correct approach to
> > accessing them.

> > Thanks in advance.

> > Joe



Sat, 22 May 2004 19:55:16 GMT
 SQL Server event log
Thanks.  Do you know how I can determine what events will
show in the Windows Application Log?  I've looked through
the SQL Server doc and can't find any reference that
provides the list.

Joe

Quote:
>-----Original Message-----
>1) It depends on the severity level and the WITH LOG

option for userdefined
Quote:
>RAISERROR TSQL statements. Jobs can also write

success/failure to NT
Quote:
>Application Event Log
>2) The SQL Error log usually contains more detailed

information on errors
Quote:
>than the NT log. It can also produce more verbose output
depending on any
>Trace flags you might have set
>3) You can open it with Notepad , view it in EM, view it
in QA using
>xp_readerrorlog lognum (omit the lognumber if you want to
view current log -
>you can get a list of errorlogs using xp_enumerrorlogs)

>e.g. exec master..xp_readerrorlog

>would return the current log
>Or you can use the ReadErrorLog Method of a SQLServer
Object

>HTH
>Jasper Smith


message

>> I'm new to SQL Server and have a quick question on event
>> logs.  I'm trying to understand the following:

>> 1) What SQL Server events appear in the Windows event
log
>> (I'm assuming there is a list - but can't find it in the
>> doc)?

>> 2) Are these events different from what appears in the
SQL
>> Server logs (e.g. accessible in Enterprise Manager)?

>> 3) How do I get programmatic access to the SQL Server
>> log?  I see the files in \Program Files\Microsoft SQL
>> Server\MSSQL\LOGS.  Not sure of the correct approach to
>> accessing them.

>> Thanks in advance.

>> Joe

>.



Sun, 23 May 2004 22:48:51 GMT
 SQL Server event log

Quote:
> Thanks.  Do you know how I can determine what events will
> show in the Windows Application Log?

See my earlier post (reposted below):

Quote:
> 1) It depends on the severity level and the WITH LOG option for userdefined
> RAISERROR TSQL statements. Jobs can also write success/failure to NT
> Application Event Log

Also, if a message has been configured to write to the log (mask on 128 in dlevel column in
sysmessages). Severity level 19 (I believe) and above are always written, regardless of dlevel.
To see the ones written with lower severity level:

SELECT *
 FROM master..sysmessages
 WHERE dlevel & 128 = 128
 AND severity < 19
ORDER BY severity, error

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sql...


Quote:
> Thanks.  Do you know how I can determine what events will
> show in the Windows Application Log?  I've looked through
> the SQL Server doc and can't find any reference that
> provides the list.

> Joe

> >-----Original Message-----
> >1) It depends on the severity level and the WITH LOG
> option for userdefined
> >RAISERROR TSQL statements. Jobs can also write
> success/failure to NT
> >Application Event Log
> >2) The SQL Error log usually contains more detailed
> information on errors
> >than the NT log. It can also produce more verbose output
> depending on any
> >Trace flags you might have set
> >3) You can open it with Notepad , view it in EM, view it
> in QA using
> >xp_readerrorlog lognum (omit the lognumber if you want to
> view current log -
> >you can get a list of errorlogs using xp_enumerrorlogs)

> >e.g. exec master..xp_readerrorlog

> >would return the current log
> >Or you can use the ReadErrorLog Method of a SQLServer
> Object

> >HTH
> >Jasper Smith


> message

> >> I'm new to SQL Server and have a quick question on event
> >> logs.  I'm trying to understand the following:

> >> 1) What SQL Server events appear in the Windows event
> log
> >> (I'm assuming there is a list - but can't find it in the
> >> doc)?

> >> 2) Are these events different from what appears in the
> SQL
> >> Server logs (e.g. accessible in Enterprise Manager)?

> >> 3) How do I get programmatic access to the SQL Server
> >> log?  I see the files in \Program Files\Microsoft SQL
> >> Server\MSSQL\LOGS.  Not sure of the correct approach to
> >> accessing them.

> >> Thanks in advance.

> >> Joe

> >.



Sun, 23 May 2004 23:02:21 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. SQL Server event log error

2. SQL Server Event Log

3. Three event logged in the event view About SQLAgent whenever clear the event logs or failover

4. Logging Events to the Log from SQL Executive

5. Logging of SQL messages on the NT event log

6. Strange SQL Server message in application event log

7. NT App'n Event Log (Size) and SQL Server performance

8. SQL Server 2000 Event Log Error

9. NT Event log - SQL Server errror message.

10. How do you get sql server 2000 messages to appear in the Windows Event Log

11. KDC event in system log stats multiple sql-server accounts


 
Powered by phpBB® Forum Software