Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Error on upgrade
Last Post 10/12/2008 9:25 AM by Peter Donker. 8 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Rob Bates
New Member
New Member
Posts:16


--
09/05/2008 9:19 PM

Hi Peter,

I got the following error while performing an upgrade on my local system for testing.  Other than that the messages said the installation was successful.  Should I be worried about this?

Thanks in advance.

StartJob Start Sql execution: 04.00.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: 'FK_DMX_Subscriptions_DMX_Entries' is not a constraint. Could not drop constraint. See previous errors. 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(TdsParserStateObject stateObj) 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 DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.[DMX_Subscriptions] DROP CONSTRAINT [FK_DMX_Subscriptions_DMX_Entries], CONSTRAINT [FK_DMX_Subscriptions_Users] System.Data.SqlClient.SqlException: 'PK_DMX_Subscriptions' is not a constraint. Could not drop constraint. See previous errors. 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(TdsParserStateObject stateObj) 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 DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.[DMX_Subscriptions] DROP CONSTRAINT [PK_DMX_Subscriptions] System.Data.SqlClient.SqlException: The index 'PK_DMX_Subscriptions' is dependent on column 'id'. ALTER TABLE DROP COLUMN id failed because one or more objects access this column. 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(TdsParserStateObject stateObj) 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 DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.[DMX_Subscriptions] DROP COLUMN [id] System.Data.SqlClient.SqlException: The operation failed because an index or statistics with name 'PK_DMX_Subscriptions' already exists on table 'dbo.DMX_Subscriptions'. Could not create constraint. See previous errors. 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(TdsParserStateObject stateObj) 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 DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ALTER TABLE dbo.[DMX_Subscriptions] ADD CONSTRAINT [PK_DMX_Subscriptions] PRIMARY KEY CLUSTERED ([EntryId], [UserId])
EndJob End Sql execution: 04.00.00.SqlDataProvider file

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/05/2008 9:24 PM
Rob,
I'd not go production until you've worked this out. What version are you upgrading from?
Peter
Rob Bates
New Member
New Member
Posts:16


--
09/06/2008 1:27 AM

Version 03.04.11

I've not tested all functionality but all files appear OK.  I'll continue testing and see what errors I get.  I don't understand the error message totally so Its beyond me.

 

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/06/2008 10:01 AM
There appears to have been a problem reorganizing the DMX_Subscriptions table. So you'll want to test the subscription functionality.

Peter
Rob Bates
New Member
New Member
Posts:16


--
09/10/2008 7:10 PM
Peter,

I've done some testing on subscriptions and it looks to be OK. Seeing that the ALTER TABLE commands on the DMX_Subscriptions table failed I'm concerned that the table is not now set up properly although I'm not getting any errors.

Below is the create script for the DMX_Subscriptions table as it is now. Is this the way it should be?

Thanks...

USE [DotNetNuke]
GO
/****** Object: Table [dbo].[DMX_Subscriptions] Script Date: 09/10/2008 11:39:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DMX_Subscriptions](
[EntryId] [int] NOT NULL,
[id] [int] IDENTITY(1,1) NOT NULL,
[LastAccess] [datetime] NULL,
[UserId] [int] NOT NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[DMX_Subscriptions] WITH NOCHECK ADD CONSTRAINT [FK_DMX_Subscriptions_DMX_Entries] FOREIGN KEY([EntryId])
REFERENCES [dbo].[DMX_Entries] ([EntryId])
ON DELETE CASCADE
NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[DMX_Subscriptions] CHECK CONSTRAINT [FK_DMX_Subscriptions_DMX_Entries]
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/10/2008 11:29 PM
OK, this aparently was not changed in your installation. The change can easily be done by hand.

1. Drop the primary key constraint on [id]
2. Remove column [id]
3. Set primary key to be the combination of [EntryId], [UserId]
As you can see I got rid of the [id] column which was only there as a primary key (autonumber field). It makes more sense to set the constraint on what really matters: document and user combination.

Peter
Rob Bates
New Member
New Member
Posts:16


--
09/11/2008 12:42 AM
Done. Thanks.
Abdel-Rahman El-MAhdi
New Member
New Member
Posts:1


--
10/10/2008 11:01 AM
I uploaded DMX 03_05_06 and succesfully installed it on a fresh version of DNN4 (but did not activate).
I then uploaded and tried to install DMX 04.03.02 but got the same error message that Rob got at the end of the installation.
I reviewed the installation document that comes with DMX4 and noticed that the 'core' and 'menu' directories supposed to be under the DMX directory are not there. Checked my WebDav according to your instructions and all is well. Everything else is also fine as far as I can see.

I looked at Robs post but did not manage to locate the script for the Subscriptions table to check if I was having the same issue (Don't know where to look!).

Can you please provide help
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/12/2008 9:25 AM
Hi Abdel-Rahman,

If you follow what I wrote in the post of 9 Oct then all should fine. Note you don't have to install 03.05.06 before installing DMX 4. All DMX versions are fine for auto upgrade and first install.

Don't worry about the missing Menu and Core directories. They have been deprecated.

Peter
You are not authorized to post a reply.