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
Solved

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

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

790 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