2.3.8.5 upgrade script errors

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
6/16/2012 4:32:10 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

2.3.8.5 upgrade script errors

While upgrading a site to 2.3.8.5 I encountered these script errors 

Running script webstore - 0.0.6.9 - 00:00:00.7800000

System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'ws_OfferHistory' in the database. 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() 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 mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.8112000

and

Running script webstore - 0.0.0.2 - 00:00:00.8424000
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'dbo.ws_Category_Delete'. 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() 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 mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.8736000

For background, my site database was originally SQL CE, then migrated to SQL Server using scripts from Joe and some manual fixes afterwards. 

Does this matter?  (I'll try to dig around and find what scripts it was trying to run).

6/17/2012 9:14:17 AM
Gravatar
Total Posts 18439

Re: 2.3.8.5 upgrade script errors

Yes, the conversion from SQL Ce is probably the cause because SQL CE it did not include webstore. But the error says the webstore tables already exist. If you ran the scripts for those manually it may be missing a row in the mp_SchemaVersion table so it thinks it needs to run those scripts again and is trying to create things that already exist.

If Webstore is functional prior to the upgrade you may need to create or update a row in that table to contain:

webstore as the application name, you can put d0f50c83-9752-4722-8b0b-4bd9718966ff for the application guid and set Major, Minor, Build, Revision to 0 0 7 3 

Also SQL CE did not support the [dbo] owner prefix on tables, but if that were causing problems I would expect errors with the core upgrade scripts.

Hope that helps,

Joe

6/30/2012 3:08:53 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: 2.3.8.5 upgrade script errors

Thanks Joe you were right. I had created the webstore tables manually after converting from CE, and that row was missing from mp_SchemaVersion.

All good now.

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