Versions / Builds Affected
WebMonitor 2013 build 20130314
Status
Resolved
Problem Summary
The dashboard and reports show a domain as 'unknown' with a considerable amount of hits
TT / JIRAID
899
How to Identify
Customer is using a SQL Server database and the following error is logged in the Application event log:
Log Name: Application
Source: WebMonitor
Date: 5/23/2013 10:58:15 AM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: GZP1APR1.liteonit.com
Description:
Error occurred during bulk inserted data processing. System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'DomainID', table 'WebMonitor-test.dbo.Sites'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WebMon.Dal.SqlServer.ActivityBulkDataProcessor.<>c__DisplayClass3.
b__1()
Event Xml:
0
2
0
0x80000000000000
47190
Application
GZP1APR1.liteonit.com
Error occurred during bulk inserted data processing. System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'DomainID', table 'WebMonitor-test.dbo.Sites'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at WebMon.Dal.SqlServer.ActivityBulkDataProcessor.<>c__DisplayClass3.b__1()
Workaround / Fix Details
1. Make a backup of the current WebMonitor database
2. Run the following script on the database (change all instances of {database_name} with the name of the WebMonitor database:
select *
into #tempDomains
from [{database_name}].[dbo].[Domains]
drop index IX_Domains_Name on [{database_name}].[dbo].[Domains]
alter table [{database_name}].[dbo].[Domains] alter column Name nvarchar(255) not null
update [{database_name}].[dbo].[Domains] set Name =
(
select #tempDomains.Name from #tempDomains where #tempDomains.ID = [{database_name}].[dbo].[Domains].ID
)
CREATE NONCLUSTERED INDEX [IX_Domains_Name] ON [{database_name}].[dbo].[Domains]
(
[Name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
drop table #tempDomainsRequired Actions
1. Provide the workaround to the customer
2. Attach this article to the case