Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > problems after database migration View modes: 
User avatar
Member
Member
rherring-fs.fed - 1/25/2010 10:04:22 AM
   
problems after database migration
We recently migrated our KenticoCMS database from one SQL Server 2005 server to another SQL Server 2005 server. Since migrating, we have been experiencing different errors and the application pool being used for the KenticoCMS app frequently stops for no apparent reason thus causing our website to go offline.

Here are the steps we used to migrate the database.
1. Backup/restore KenticoCMS database to new SQL Server 2005 server
2. Modified the connection string in web.config to point to the new SQL Server 2005 KenticoCMS database

The version of KenticoCMS being used is: version 4.0 Build: 4.0.3328
Web Server: IIS 7, Windows Server 2008
Database: SQL Server 2005, Windows Server 2008

Here is the error message:
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 1/21/2010 1:34:46 PM
Event ID: 1334
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: websgcp
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/4/ROOT

Process ID: 284

Exception: System.Exception

Message: [DataConnection.ExecuteQuery]: Query: INSERT INTO CMS_EventLog ([EventType], [EventTime], [Source], [EventCode], [UserID], [UserName], [IPAddress], [NodeID], [DocumentName], [EventDescription], [SiteID], [EventUrl], [EventMachineName] ) VALUES ( @EventType, @EventTime, @Source, @EventCode, @UserID, @UserName, @IPAddress, @NodeID, @DocumentName, @EventDescription, @SiteID, @EventUrl, @EventMachineName); SELECT @@identity AS [EventID]: caused exception: Cannot insert the value NULL into column 'EventID', table 'KenticoCMS.dbo.CMS_EventLog'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Any assistance would be greatly appreciated.

Thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 1/25/2010 2:23:41 PM
   
RE:problems after database migration
Hi,

the solution here is to configure your EventID field in table CMS_EventLog to be primary key and to use Identity (true).

Best regards,
Miroslav Remias.

User avatar
Member
Member
rherring-fs.fed - 1/26/2010 6:52:48 AM
   
RE:problems after database migration
Thanks! That worked!