Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I turn on verbose logging in MS SQL Server 2005?

Posted on 2007-12-04
5
Medium Priority
?
5,358 Views
Last Modified: 2010-04-21
One of our SQL servers has decided to stop working.  It works fine after we reboot for a few hours, then stops again.  Logs and eventvwr show nothing.  I am wondering if there is a way to turn on verbose logging in SQL Server 2005.

Any help is appreciated.
0
Comment
Question by:lou6150
  • 3
5 Comments
 
LVL 16

Expert Comment

by:SQL_SERVER_DBA
ID: 20405761
/l*v switch to turn on verbose logging
0
 

Author Comment

by:lou6150
ID: 20405777
I'm sorry, can you elaborate?  Where do I use that switch?
0
 
LVL 1

Accepted Solution

by:
Alex342 earned 2000 total points
ID: 20405926
Editing the NSService.exe.config File
The default installation folder is C:\Program Files\Microsoft SQL Server\90\Notification Services\n.n.n\bin. You can edit the NSservice.exe.config file with any text or XML editor.

To edit the NSservice.exe.config file
Open the Bin folder of the Notification Services installation.

The default installation folder is C:\Program Files\Microsoft SQL Server\90\NotificationServices\n.n.nnn\bin.

Open the NSservice.exe.config file.

For each of the items in the <switches> node, set the logging level by changing the value attribute.

In the following example, the LogAdministrative logging level is set to 3, which turns on logging for error, warning, and informational events for the administrative components:

 Copy Code
<add name="LogAdministrative" value="3"/>
 

Initially, each logging option is set to 2, which turns on logging for error and warning messages only.

To apply the logging changes, save the file and restart the instance of Notification Services.

NSservice.exe.config Logging Elements
The NSservice.exe.config file contains elements that control event logging from various components of Notification Services; they are listed in the following table.

Element name  Logging category  
LogAdministrative
 SQL Server Management Studio and nscontrol utility events
 
LogService
 NS$instanceName Microsoft Windows service events
 
LogEventProvider
 Event provider events
 
LogEventCollector
 EventCollector object events
 
LogGenerator
 Generator events
 
LogDistributor
 Distributor events
 
LogVacuumer
 Vacuumer events
 
LogPerformanceMonitor
 Performance monitor events
 
LogOther
 Events for all other components, such as the standard content formatter and delivery protocols
 

Logging Level Values
Logging levels determine which types of events are written to the Application log. You can control the logging level by setting the value attribute to one of the following values.

Value  Description  
0
 Off
 
1
 Error messages only
 
2
 Error and warning messages
 
3
 Error, warning, and informational messages
 
4
 Verbose logging, which writes all messages to the Application log
 

0
 

Author Closing Comment

by:lou6150
ID: 31412662
Oops, forgot to give you your points!  Thanks.
0
 

Author Comment

by:lou6150
ID: 20536303
Thanks Alex342.  This worked great for us.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

772 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