MSSQL Upgrade Error

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
1/18/2010 12:13:06 PM
Gravatar
Total Posts 6

MSSQL Upgrade Error

Hi Joe, I'm seeing an error when upgrading from (I think) 2.3.2.8 to 2.3.3.4 which I downloaded today.  After wrestling long and hard with getting the DotNetOpenAuth.dll running, now I'm seeing an SQL Error on upgrade. Any help would be really appreciated.

--Dave

The error is as follows :

Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
1 site(s) found.
Running script mojoportal-core - 2.3.3.0 - 00:00:01.2128906
Running script mojoportal-core - 2.3.3.1 - 00:00:01.4892578
Running script mojoportal-core - 2.3.3.2 - 00:00:01.8671875
Running script mojoportal-core - 2.3.3.3 - 00:00:02.2568359
Running script mojoportal-core - 2.3.3.4 - 00:00:02.3408203
Configuring feature Html Content - 00:00:02.4169921
Configuring feature Site Statistics - 00:00:02.6748046
Configuring feature Web Part - 00:00:02.8496093
Configuring feature Newsletter Sign Up Form - 00:00:02.9335937
Running script blog - 0.0.1.2 - 00:00:03.2304687
Running script blog - 0.0.1.3 - 00:00:03.3261718
Running script blog - 0.0.1.4 - 00:00:03.3925781
Configuring feature Blog - 00:00:03.5234375
Configuring feature Contact Form - 00:00:04.1523437
Configuring feature Event Calendar - 00:00:04.2470703
Configuring feature Feed Manager - 00:00:04.5810546
Configuring feature Flickr Slide Show - 00:00:04.8750000
Configuring feature Image Gallery (Simple Folder Version) - 00:00:04.9414062
Running script forums - 0.0.0.9 - 00:00:05.0009765
Running script forums - 0.0.1.0 - 00:00:05.0439453
Running script forums - 0.0.1.1 - 00:00:05.0849609
Configuring feature Forums - 00:00:05.1123046
Configuring feature Google Map - 00:00:05.1914062
Configuring feature Google Translate - 00:00:05.4248046
Configuring feature Html Fragment Include - 00:00:05.5585937
Configuring feature IFrame - 00:00:05.6103515
Running script imagegallery - 0.0.0.4 - 00:00:05.7177734
Configuring feature Image Gallery - 00:00:05.7871093
Running script linksmodule - 0.0.0.5 - 00:00:05.9003906
Configuring feature Simple List/Links - 00:00:05.9628906
Configuring feature Live Messenger Chat - 00:00:06.0419921
Configuring feature Poll - 00:00:06.1025390
Running script sharedfiles - 0.0.0.5 - 00:00:06.1347656
Running script sharedfiles - 0.0.0.6 - 00:00:06.2207031
Running script sharedfiles - 0.0.0.7 - 00:00:06.2539062
Configuring feature Shared Files - 00:00:06.3320312
Configuring feature Survey - 00:00:06.5439453
Configuring feature Twitter Profile Widget - 00:00:06.5703125
Configuring feature Twitter Search Widget - 00:00:06.6884765
Running script webstore - 0.0.6.0 - 00:00:06.8115234
Running script webstore - 0.0.6.1 - 00:00:06.8906250
Configuring feature Web Store - 00:00:06.9863281
Configuring feature Xml/Xsl - 00:00:07.0244140
Ensuring all features are installed in server admin sites... - 00:00:07.0517578
An Error Occurred:Cannot insert the value NULL into column 'SortOrder', table 'mojo.dbo.mp_ModuleSettings'; column does not allow nulls. UPDATE fails. The statement has been terminated.
Source:.Net SqlClient Data Provider
Stack Trace 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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at mojoPortal.Data.DBModuleDefinition.SyncDefinitions() at mojoPortal.Business.ModuleDefinition.SyncDefinitions() at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

1/18/2010 12:23:48 PM
Gravatar
Total Posts 18439

Re: MSSQL Upgrade Error

Hi David,

That is strange. Has this installation been upgraded over time from a very old version?

I would manually run this query from query analyzer or by enabling our Query Tool:

UPDATE mp_ModuleDefinitionSettings

SET SortOrder = 5000

WHERE SortOrder IS NULL

Then I would try visiting the setup page again. Most of setup succeeded, this last error may not have caused any problem but this should solve it if there is any  problem.

Best,

Joe

1/18/2010 1:27:01 PM
Gravatar
Total Posts 6

Re: MSSQL Upgrade Error

Hi Joe, the version actually isn't all that old - I installed it originally in November last year from the latest version here. (The version of mojoPortal.Business.dll was 1.0.3601.27666 of that helps).

I ran that script (against both mp_ModuleDefinitionSettings and mp_ModuleSettings) and both queries resulted in no changes.

The script failed to run again at the same point after I had attempted the changes.  Any ideas?

1/19/2010 1:34:17 PM
Gravatar
Total Posts 18439

Re: MSSQL Upgrade Error

Hi,

Can you execute this from query anaylzer and then try setup page again:

ALTER PROCEDURE [dbo].[mp_ModuleSettings_SyncDefinitions]

AS

UPDATE mp_ModuleSettings
SET ControlSrc = (SELECT TOP 1 mds.ControlSrc
    FROM mp_ModuleDefinitionSettings mds
    WHERE mds.ModuleDefId IN (SELECT ModuleDefId
          FROM mp_Modules m
          WHERE m.ModuleID = mp_ModuleSettings.ModuleID)
    AND mds.SettingName = mp_ModuleSettings.SettingName
    )

UPDATE mp_ModuleSettings
SET ControlType = (SELECT TOP 1 mds.ControlType
    FROM mp_ModuleDefinitionSettings mds
    WHERE mds.ModuleDefId IN (SELECT ModuleDefId
          FROM mp_Modules m
          WHERE m.ModuleID = mp_ModuleSettings.ModuleID)
    AND mds.SettingName = mp_ModuleSettings.SettingName
    )

UPDATE mp_ModuleSettings
SET SortOrder = COALESCE((SELECT TOP 1 mds.SortOrder
    FROM mp_ModuleDefinitionSettings mds
    WHERE mds.ModuleDefId IN (SELECT ModuleDefId
          FROM mp_Modules m
          WHERE m.ModuleID = mp_ModuleSettings.ModuleID)
    AND mds.SettingName = mp_ModuleSettings.SettingName
    ),9000)

UPDATE ms
SET ms.RegexValidationExpression = mds.RegexValidationExpression
FROM mp_ModuleSettings ms
JOIN mp_Modules m
ON ms.ModuleID = m.ModuleID
JOIN mp_ModuleDefinitionSettings mds
ON ms.SettingName = mds.SettingName
AND m.ModuleDefId = mds.ModuleDefId


UPDATE mp_ModuleSettings
SET HelpKey = (SELECT TOP 1 mds.HelpKey
    FROM mp_ModuleDefinitionSettings mds
    WHERE mds.ModuleDefId IN (SELECT ModuleDefId
          FROM mp_Modules m
          WHERE m.ModuleID = mp_ModuleSettings.ModuleID)
    AND mds.SettingName = mp_ModuleSettings.SettingName
    )


GO
 

Please let me know if that solves it.

Best,

Joe

1/19/2010 2:15:50 PM
Gravatar
Total Posts 6

Re: MSSQL Upgrade Error

It worked!  Thanks very much for the help Joe, I really appreciate it :-)

Dave

You must sign in to post in the forums. This thread is closed to new posts.