NPS and NAP SQL logging
Hi,
I am having trouble with the SQL logging functionlity of NPS. Logging
to a log file works fine, but logging to SQL causes the HRA to stop
processing requests. Both the client and the server record error
events when I enable SQL logging. SQL logging is likely not
setup correctly because the DB it points to has no report_event
stored procedure, which is mentioned in the help. When I test the
SQL server connection using the 'Test Connection' button, it reports
it tested successfully. I have found a few examples saying this
works, and MS is using it, but I cannot find anything on how to set
it up, other than the help which does not describe the database
portion.
Is there any documentation other than the Server 2008 help on how SQL
logging works with NPS\NAP? Is there a sample DB and report_event SP
someone could provide me? Am I missing something? Any information
would be helpful.
All Replies
- Has anyone got a solution for this? I've created a database using the script here and as soon as I enable the SQL Logging in NPS, nobody can connect to the VPN server. The Test Connection button works and I can see the tables and the SP in the database.
http://msdn.microsoft.com/en-us/library/bb960723(VS.85).aspx - Hi,
You could also try posting this question in the NAP forum.
Here are some commands to create the database, create a table, and create a stored procedure.
USE [master] CREATE DATABASE [NPSXML] ON PRIMARY (NAME = N'NPSXML', FILENAME = N'D:\NPSSQL\NPSXML.mdf’) LOG ON (NAME = N'NPSXML_log', FILENAME = N'D:\NPSSQL\NPSXML_log.LDF') USE [NPSXML] CREATE TABLE [dbo].[NPS_Packets] ([PacketTime] [datetime] NOT NULL DEFAULT (getutcdate()), [NPS_Attributes] [xml] NOT NULL) ON [PRIMARY] CREATE PROCEDURE [dbo].[Report_Event] (@doc nvarchar(max)) AS INSERT INTO NPS_Packets (PacketTime, NPS_Attributes) VALUES (GETUTCDATE(), @doc)
I hope this helps,
-Greg
P.S. The underscore gets a little lost in the code formatting above, so make sure the procedure is named report_event. This is important, as you noted above.- Proposed As Answer byGreg LindsayMSFTWednesday, November 19, 2008 9:12 PM
- Edited byGreg LindsayMSFTWednesday, November 19, 2008 9:35 PMps

