Solved

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

Posted on 2007-12-04
5
5,314 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
[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
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 500 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

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

615 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