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-> 7.2.2 upgrade fails creating index7.2.1-> 7.2.2 upgrade fails creating index
Previous
 
Next
New Post
4/6/2014 10:41 AM
 

I am getting the following error upgrading one site from 7.2.1 to 7.2.2 (another site went without issues)

26% ERROR occured - System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.ModulePermission' and the index name 'IX_ModulePermission_Modules'. The duplicate key value is (494, 1, 0, <NULL>). 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, Boolean asyncWrite) 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:2f070015-7030-4f36-ad88-8338a93e3a63 CREATE UNIQUE NONCLUSTERED INDEX IX_ModulePermission_Modules ON dbo.[ModulePermission] (ModuleID, PermissionID, RoleID, UserID) INCLUDE (AllowAccess) System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.ModulePermission' and the index name 'IX_ModulePermission_Roles'. The duplicate key value is (0, 494, 1). 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, Boolean asyncWrite) 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:a2cb2320-e762-4f4f-b5ec-bbb3a8f72472 CREATE UNIQUE NONCLUSTERED INDEX IX_ModulePermission_Roles ON dbo.[ModulePermission] (RoleID, ModuleID, PermissionID) INCLUDE (AllowAccess) WHERE RoleID IS NOT Null

This site is down now so any help is appreciated


Regards Luís Rodrigues
 
New Post
4/6/2014 10:55 AM
 

extra data

I've searched the dbo.ModulePermissions and found the offending data - but changing the role in one of them keeps the same error - even though now they are not equal

They both exist in the table cause one is in portal 0 and the other has a portalid of <null> so i guess was deleted


Regards Luís Rodrigues
 
New Post
4/6/2014 11:51 AM
 
Deleted the offending record - still gives the same errror

Regards Luís Rodrigues
 
New Post
4/6/2014 12:01 PM
 

Ok Fixed it myself

I had to recycle the Application AFTER deleting the offending record

hopefully all is ok


Regards Luís Rodrigues
 
New Post
4/6/2014 1:40 PM
 
recycling the application domain is required after you do a direct database update as the "bad" data will still be cached. Please log an issue to support.dnnosftware.com for this problem so we can add code to detect and delete any bad data that might cause an upgrade failure. Note: this is the 1st incident I've seen of this issue which suggests the issue is rare, and perhaps from a badly behaved 3rd party module rather than the platform itself

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...7.2.1-> 7.2.2 upgrade fails creating index7.2.1-> 7.2.2 upgrade fails creating index


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