Solved

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

Posted on 2007-12-04
5
5,248 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
Comment Utility
/l*v switch to turn on verbose logging
0
 

Author Comment

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

Accepted Solution

by:
Alex342 earned 500 total points
Comment Utility
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
Comment Utility
Oops, forgot to give you your points!  Thanks.
0
 

Author Comment

by:lou6150
Comment Utility
Thanks Alex342.  This worked great for us.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now