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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Primary Key already defined error in upgrade to 05.01.00Primary Key already defined error in upgrade to 05.01.00
Previous
 
Next
New Post
7/26/2009 5:55 PM
 

I was upgrading to DNN 5.1.0.  The entire upgrade process was successful except for the SqlDataProvider upgrade to 05.01.00.  I received the following during the upgrade process:

00:00:10.827 -   Executing Script: 05.01.00.SqlDataProvider Error! (see 05.01.00.log for more information)
...
00:01:09.326 -   Executing Application Upgrades: 05.01.00 Error!

When I looked in the 05.01.00.log file, I discovered the following:

System.Data.SqlClient.SqlException: Table 'PSRB_EventLog' already has a primary key defined on it.
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)

 

/* Change primary key of EventLog Table */
/****************************************/

IF NOT EXISTS (SELECT 1 FROM INformATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'dbo.PSRB_EventLog' AND COLUMN_NAME = 'LogEventID')
 BEGIN
  --Note this name does NOT have an object qualifier in 4.x upgrades
  IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'PK_EventLogMaster'))
   ALTER TABLE dbo.PSRB_EventLog
    DROP CONSTRAINT PK_EventLogMaster

  --Note this name does have an object qualifier in 5.x installs
  IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'PK_PSRB_EventLogMaster'))
   ALTER TABLE dbo.PSRB_EventLog
    DROP CONSTRAINT PK_PSRB_EventLogMaster

  ALTER TABLE dbo.PSRB_EventLog
   ADD LogEventID bigint NOT NULL IDENTITY (1, 1)
   
  ALTER TABLE dbo.PSRB_EventLog
   ADD CONSTRAINT PK_PSRB_EventLogMaster PRIMARY KEY CLUSTERED ( LogEventID )  
 END
 

Can anyone please explain how to resolve this error?  My DNN site came up fine, even after the error - so I'm not expecting anything too tough to resolve.  I did use an object qualifier in my database provider statement ("PSRB") - but that was from the original installation years ago.

Thanks for the help!

Todd Sturner

 
New Post
7/26/2009 8:13 PM
Accepted Answer 

Todd,

please be informed, that this is a known issue, which will be fixed in DNN 5.1.1

it shouldn't affect your site to work properly.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/26/2009 11:59 PM
 

Sebastian - thanks.  Although, I do think there is a problem, but I don't know if it's related or not.

I'm now getting an error on the HTML module:

Error: Welcome is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: D:\Active Websites\Arizona Scottish Rite\DesktopModules\HTML\HtmlModule.ascx.vb(61): error BC30560: 'HtmlTextController' is ambiguous in the namespace 'DotNetNuke.Modules.Html'. ---> System.Web.HttpCompileException: D:\Active Websites\Arizona Scottish Rite\DesktopModules\HTML\HtmlModule.ascx.vb(61): error BC30560: 'HtmlTextController' is ambiguous in the namespace 'DotNetNuke.Modules.Html'. at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---

Is this error related?  Even if it isn't - how do I resolve it without losing the text that was displayed in the control prior to the upgrade?

Thanks!

Todd

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Primary Key already defined error in upgrade to 05.01.00Primary Key already defined error in upgrade to 05.01.00


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