database core schema needs upgrade.

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.
3/2/2009 2:40:45 AM
Gravatar
Total Posts 3

database core schema needs upgrade.

Hello

I am looking for some help with installation.

The setup page reads 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.
0 site(s) found.
Running script mojoportal-core - 2.2.1.9 - 00:00:00.1250000
System.Data.SqlClient.SqlException: 參數 @objname 模稜兩可或是所宣告的 @objtype (COLUMN) 有誤。 於 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 於 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 於 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 於 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 於 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) 於 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) 於 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 於 mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters) 於 mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) 於 mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) 於 mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.1562500
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

 

Thanks,
 

3/2/2009 6:57:27 AM
Gravatar
Total Posts 18439

Re: database core schema needs upgrade.

Something has gone wrong, it should never run scripts with lower versions than 2.2.7.8, it should start with that version and go up from there.

If its running old upgrade scripts then something went wrong with the initial setup and it created the mp_Sites table but failed to create the rest. 

So on the next try it detects the mp_Sites table and therefore tries to run upgrade, but since it failed the first time, it doesn't know what the correct version is so its running older scripts that it should not run at all.

You need to try again with an empty db, either delete all tables and stored procs or create a new empty db.

Hope it helps,

Joe

3/2/2009 7:01:03 PM
Gravatar
Total Posts 3

Re: database core schema needs upgrade.

Hi Joe,

I have a new error on install.

Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema needs to be created.
Running script mojoportal-core - 2.2.7.8 - 00:00:00.2031250
Running script mojoportal-core - 2.2.7.9 - 00:00:14.3593750
Running script mojoportal-core - 2.2.8.0 - 00:00:14.3750000
Running script mojoportal-core - 2.2.8.1 - 00:00:14.3906250
Running script mojoportal-core - 2.2.8.2 - 00:00:14.3906250
Running script mojoportal-core - 2.2.8.3 - 00:00:14.4062500
Running script mojoportal-core - 2.2.8.4 - 00:00:14.4062500
Running script mojoportal-core - 2.2.8.5 - 00:00:14.4531250
Running script mojoportal-core - 2.2.8.6 - 00:00:14.4531250
Running script mojoportal-core - 2.2.8.7 - 00:00:14.4687500
System.Data.SqlClient.SqlException: count-unique aggregate 動作不得用 uniqueidentifier 資料型別作為引數。 於 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 於 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 於 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 於 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 於 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) 於 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) 於 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 於 mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters) 於 mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) 於 mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) 於 mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:14.4843750
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

 

mojoPortal runs with MSSQL 2000,Windows2003


Best,
 

3/5/2009 6:37:34 AM
Gravatar
Total Posts 18439

Re: database core schema needs upgrade.

Hmm,

It seems I introduced some sql in recent versions that is not compatible with SQL 2000. I'm sure there is a way to modify the SQL so it can work but I don't currently have a machine setup to test MS SQL 2000. When I get a chance to set one up I will take a look at this.

In the meantime since you already have MS SQL 2000 installed, one option, if you have SQL skills is to edit the sql to make it compatible. If you do this and send me the modified scripts I will integrate them.

The scripts are located at /Setup/applications/mojoportal-core/SchemaUpgradeScripts/mssql

You can start with the one its complaining about, 2.2.8.7.cofig file, paste it into query analyzer and see if you can re-work the syntax to something that does the same thing but works with SQL 2000.

Hope it helps,

Joe 

3/5/2009 6:45:31 PM
Gravatar
Total Posts 3

Re: database core schema needs upgrade.

Hi Joe,

Thank you very much,

I try to re-work with MS SQL 2005

It is OK on install.

 

Best Regards,

3/10/2009 5:31:37 AM
Gravatar
Total Posts 1

Re: database core schema needs upgrade.

Hi,

We are using this in a production environment so it's not as easy to switch to 2005.  I have modified the procedure that's causing the error to work with SQL 2000 and attached below.  Any feedback would be appreciated.

 


CREATE PROCEDURE [dbo].mp_CommerceReport_GetCount

/*
Author: Joe Audette
Created: 2009-02-12
Last Modified: 2009-02-12
*/

@ModuleGuid uniqueidentifier

AS

select count(*) from (
select itemguid from [dbo].[mp_CommerceReport]
where ModuleGuid=@ModuleGuid
group by itemguid
) itemlist

GO

3/10/2009 7:10:22 AM
Gravatar
Total Posts 18439

Re: database core schema needs upgrade.

Hi Dave,

Thanks for this, it looks correct to me. I'm in the process of setting up SQL 2000 here on an old machine so I will be better able to test and avoid these compatibility bugs. Its usually just aggregation issues like this that can creep in easily because the syntax is easier in SQL 2005 but there is a generally always a way to write it that can still work with SQL 2000. Its easy to forget the things you can't do in SQL 2000 when not using it in a long time.

In any case my intention is to maintain compatibility with SQL 2000 for as long as possible so I'm setting up a machine to be able to check from time to time more easily and make sure I haven't broken anything. 

I'll verify your fix and get it into the scripts for the next release.

Best,

Joe

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