Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...7.2.1 to 7.2.2 upgrade fail!7.2.1 to 7.2.2 upgrade fail!
Previous
 
Next
New Post
3/20/2014 10:57 AM
 
26% ERROR occured - System.Data.SqlClient.SqlException (0x80131904): Violation of UNIQUE KEY constraint 'IX_FolderPermission'. Cannot insert duplicate key in object 'dbo.FolderPermission'. The duplicate key value is (855, 5, <NULL>, 36). The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script) ClientConnectionId:91cf3779-5c9c-447b-9d12-f6dc522443f2 --Correct error data UPDATE dbo.[FolderPermission] SET RoleID = NULL WHERE UserID IS NOT NULL System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.FolderPermission' and the index name 'IX_FolderPermission_Users'. The duplicate key value is (36, 855, 5). The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script) ClientConnectionId:19d2fb83-382e-481e-9e4b-812bbf7e2273 CREATE UNIQUE NONCLUSTERED INDEX IX_FolderPermission_Users ON dbo.[FolderPermission] (UserID, FolderID, PermissionID) INCLUDE (AllowAccess) WHERE UserID IS NOT Null System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.FolderPermission' and the index name 'IX_FolderPermission_Roles'. The duplicate key value is (-1, 378, 5). The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script) ClientConnectionId:9ec60a50-89da-4054-9393-5e0cd69154dc CREATE UNIQUE NONCLUSTERED INDEX IX_FolderPermission_Roles ON dbo.[FolderPermission] (RoleID, FolderID, PermissionID) INCLUDE (AllowAccess) WHERE RoleID IS NOT Null   
 
New Post
3/20/2014 11:03 AM
 
How do I fix this?
I don't get it how an existing good DNN install can be broken by a version upgrade..
 
New Post
3/20/2014 11:52 AM
 
Apparently you have duplicate values in the FolderPermission table. Luckily the error message shows which record is duplicate, so the solution to this is to restore your site to the preupgrade stage, and delete the duplicate records from the FolderPermission table.

The reason this may happen is because we are constantly adding database performance improvements. Some of those improvements may error on data issues, that in and by themselves do not cause any immediate issues in the older version

Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
3/20/2014 12:20 PM
 
this was one of a set of database optimizations contributed by a community member - they look fine themselves, but therer's always a danger that some old site may have invalid data (e.g. perhaps from a direct database update from a 3rd party module) and the fail - howevert I'm concerned that this is only an upgrade from 7.2.1->7.2.2 so that's much less likely. Would there be any way you could let us have a copy of your database so we can check and see what the issue might be?

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
3/20/2014 12:31 PM
 
Erik van Ballegoij wrote:
Apparently you have duplicate values in the FolderPermission table. Luckily the error message shows which record is duplicate, so the solution to this is to restore your site to the preupgrade stage, and delete the duplicate records from the FolderPermission table.

The reason this may happen is because we are constantly adding database performance improvements. Some of those improvements may error on data issues, that in and by themselves do not cause any immediate issues in the older version

Thanks Erik, I'll try that, but why can't the DNN upgrade process do like a pre-upgrade check and don't do any changes if it finds issues, duplicates, etc. instead of breaking the whole installation? 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...7.2.1 to 7.2.2 upgrade fail!7.2.1 to 7.2.2 upgrade fail!


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out