Solved

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

Posted on 2007-12-04
5
5,255 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 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

911 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

18 Experts available now in Live!

Get 1:1 Help Now