Robert,
Found the log file Shaun Walker refered to (see below), if you can find the time could you have a quick look to see if its a only a simple fix needed and let me know?? Thanks again.
System.Data.SqlClient.SqlException: Constraint 'PK_EventLogConfig' does not belong to table 'EventLogConfig'.
Could not drop constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.[PK_EventLogConfig]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1)
ALTER TABLE dbo.[EventLogConfig] DROP CONSTRAINT [PK_EventLogConfig]
System.Data.SqlClient.SqlException: Constraint 'PK_EventLogConfig' does not belong to table 'EventLogConfig'.
Could not drop constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.[PK_EventLogConfig]') and OBJECTPROPERTY(id, N'IsPrimaryKey') = 1)
ALTER TABLE dbo.[EventLogConfig] DROP CONSTRAINT [PK_EventLogConfig]
System.Data.SqlClient.SqlException: Constraint 'FK_EventLogConfig_EventLogTypes' does not belong to table 'EventLogConfig'.
Could not drop constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.[FK_EventLogConfig_EventLogTypes]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE dbo.[EventLogConfig] DROP CONSTRAINT [FK_EventLogConfig_EventLogTypes]
System.Data.SqlClient.SqlException: Constraint 'FK_EventLogConfig_EventLogTypes' does not belong to table 'EventLogConfig'.
Could not drop constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.[FK_EventLogConfig_EventLogTypes]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE dbo.[EventLogConfig] DROP CONSTRAINT [FK_EventLogConfig_EventLogTypes]
System.Data.SqlClient.SqlException: Cannot drop the index 'dbo.EventLogConfig.LogTypeKey_LogTypePortalID', because it does not exist in the system catalog.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
DROP INDEX dbo.[EventLogConfig].[LogTypeKey_LogTypePortalID]
System.Data.SqlClient.SqlException: There is already an object named 'PK_EventLogConfig' in the database.
Could not create constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
ALTER TABLE dbo.[EventLogConfig] ADD CONSTRAINT [PK_EventLogConfig] PRIMARY KEY CLUSTERED ([ID])
System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.EventLogTypes' that match the referencing column list in the foreign key 'FK_EventLogConfig_EventLogTypes'.
Could not create constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
ALTER TABLE dbo.[EventLogConfig] ADD CONSTRAINT [FK_EventLogConfig_EventLogTypes] FOREIGN KEY ([LogTypeKey]) REFERENCES dbo.[EventLogTypes] ([LogTypeKey])
System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.EventLogConfig' that match the referencing column list in the foreign key 'FK_EventLog_EventLogConfig'.
Could not create constraint. See previous errors.
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
ALTER TABLE dbo.[EventLog] ADD CONSTRAINT [FK_EventLog_EventLogConfig] FOREIGN KEY ([LogConfigID]) REFERENCES dbo.[EventLogConfig] ([ID])