Upgrade from 2.3.7.0 to 2.3.7.6

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/2/2012 9:58:54 PM
Gravatar
Total Posts 23

Upgrade from 2.3.7.0 to 2.3.7.6

At first Happy New Year!

OS Net 4.0

MSSQL

After upload all the files and run setup i had this message:

"Verifica del sistema...
Privilegi del File system ok.
MSSQL connessione al database ok.
i privilegi per il database sono sufficienti per modificare lo schema.
lo schema database iniziale gia' esistente.
lo schema centrale del database necessita aggiornamento.
1 sito(i) trovati.
Questo sito sembra operare in un ambiente protetto che usa policy Medium Trust o, almeno, inferiori a Full Trust.
Esecuzione script mojoportal-core - 2.3.7.2 - 00:00:00.0625424
System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "dbo.mp_PageModules" because it does not exist or you do not have permissions. 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.0781780"

 

Site sime to work i could not find the new media player Embarassed

Any suggestions are welkome

Tkanks Marco

 

1/3/2012 4:41:59 AM
Gravatar
Total Posts 23

Re: Upgrade from 2.3.7.0 to 2.3.7.6

I trade to reload the bin files but nothing change ... also uncomment in user.config the line "-- running in medium trust true

Pls will be happy some one could help to understand what i made wrong!!

1/3/2012 7:18:47 AM
Gravatar
Total Posts 18439

Re: Upgrade from 2.3.7.0 to 2.3.7.6

Hi,

It sounds like your database user in your connection string is not dbowner, it needs to be a dbowner during instsallation and upgrades.

Because it is not dbowner it cannot see the existing objects named with [dbo].tablename. Or else somehow your mp_PageModules table is not named with [dbo].mp_PageModules as it should be.

Hope that helps,

Joe

1/3/2012 7:49:12 AM
Gravatar
Total Posts 23

Re: Upgrade from 2.3.7.0 to 2.3.7.6

hi Joe. thanks for your prompt answear,

the string in user.config is the same like before and i made several upgrade but never had this kind of problem 

maybe it dipen of this

https://www.mojoportal.com/Forums/Thread.aspx?thread=9186&mid=34&pageid=5&ItemID=3

the was same problem on the database and you solved

1/3/2012 8:24:01 AM
Gravatar
Total Posts 23

Re: Upgrade from 2.3.7.0 to 2.3.7.6

Hi Joe!

my provider is Aruba and i found this

The owner name for all the objects created by the users must be the same of the login connected to MSSQL service: it cannot be dbo because the users do not have the dbowner permissions, option possible only on your own dedicated server

Therefore by carrying out instructions such as this

CREATE TABLE [dbo].[tbl_tablename] (
[col_id] [int] IDENTITY (1, 1) NOT NULL ,
[col_user] [nvarchar] (20) NOT NULL ,
[col_cat] [int] NULL ,
[col_sub] [int] NULL ,
[col_state] [int] NULL ,
[col_city] [nvarchar] (50) NULL ,
[col_key] [nvarchar] (100) NULL ,
[col_type] [nvarchar] (1) NULL ,
[col_both] [nvarchar] (1) NULL ,
[col_min] [money] NULL ,
[col_max] [money] NULL ,
) ON [PRIMARY]
GO
you need to replace in
CREATE TABLE [dbo].[tbl_tablename]

dbo user with their own login to the MSSQL service, for example MSSql10059 and therefore

CREATE TABLE [MSSql10059].[tbl_tablename]

Could be this the problem?

1/3/2012 8:37:03 AM
Gravatar
Total Posts 18439

Re: Upgrade from 2.3.7.0 to 2.3.7.6

Hi Marco,

Then how did it work before since all the scripts have dbo, you user must have been dbo at one time or it would not have worked before.

I just emailed you a file to replace a few of the upgrade scripts. Please replace the files as indicated and then try the setup page again.

If that does not solve it, we do have a way to handle it if your user is not dbo but it seems strange to have to solve it for an exsiting site and the solution could break things if some of your existing tables are named with dbo. So this solution is really for new installations and it is very risky to change it for upgrades and may cause more problems.

You "could" change this setting in Web.config from:

<add key="MSSQLOwnerPrefix" value="[dbo]."/>

to

<add key="MSSQLOwnerPrefix" value="[yourdbuser]."/>

then it will replace dbo in the scripts with your db user name before it executes the script. But again this is very risky for an upgrade, it is only meant for new instalaltions where dbo is not allowed, I would backup the database first in case it doesn't work.

most hosts do allow dbo since dbo is only for the specific database not for the whole server, it just gives your user complete control over his own database.

Hope that helps,

Joe

1/3/2012 9:23:16 AM
Gravatar
Total Posts 23

Re: Upgrade from 2.3.7.0 to 2.3.7.6

I replace the file like you mentioned but nothing change...

so i replace dbo user and put the file in user.config and now new problem

Esecuzione script mojoportal-core - 2.3.7.2 - 00:00:00.1094233
Esecuzione script mojoportal-core - 2.3.7.3 - 00:00:00.3439018
Esecuzione script mojoportal-core - 2.3.7.4 - 00:00:00.3595337
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'MSSql48252.mp_SiteHosts_SelectSiteIdByHost'. 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.3751656

so now all table in the database have a new prefix

1/3/2012 9:46:50 AM
Gravatar
Total Posts 18439

Re: Upgrade from 2.3.7.0 to 2.3.7.6

Hi,

I told you it was risky and only intended for new installations.

The problem is that your exisiting tables are not named with MSSql48252.tablename which they would be if this was a new installation and using that config setting. But your database has a strange history because previously the initial installation and some upgrades along the way happened without any need to change from dbo to your db username. Maybe you restored the db from another host at one time or your host changed their rule about dbo after your site was already up and running.

Your database is in an unknown state and I cannot solve that problem for you. Hopefully you backed up everything before upgrading so you can restore to the previous version.

Sorry I cannot be of more help. I believe the config setting changes would work fine for a new installation but your existing database was not created that way and something changed about your hosting otherwise it would not have installed correctly the first time. So now some of your database objects are named inconsistently and I have no solution to suggest for that other than to restore the database and all web files to the previous version and remove the newer upgrade scripts.

Best,

Joe

2/20/2012 6:44:59 PM
Gravatar
Total Posts 23

Re: Upgrade from 2.3.7.0 to 2.3.7.6

Some news my hosting provider ARUBA  have toll me that for this database is not possible have dbo so thei give me now one new database but the problem for me is how i populate the new database whit the old data? I suppose to do one backup of the old one and restore in the new one is this the right way? otherweis what to do ? Any help is appreciated

 

Thanks to all Marco

2/21/2012 8:17:56 AM
Gravatar
Total Posts 18439

Re: Upgrade from 2.3.7.0 to 2.3.7.6

All I can suggest is to use a tool like RedGate SQL Bundle or this free tool, to script off the database and data, then go through the script(s) and remove all references to dbo or any user before running the scripts on the new db.

Then if you get it working, before any future upgrades you will need to change this:

<add key="MSSQLOwnerPrefix" value="[dbo]."/>

I'm not sure you may be able to just change it like this:

<add key="MSSQLOwnerPrefix" value=" "/>

ie put a space there so that no owner prefix is used

or you may need to put your db user there like:

<add key="MSSQLOwnerPrefix" value="[youruser]."/>

whatever you put there as long as it isn't an empty string will replace [dbo]. in the mojopportal upgrade scripts before they execute.

Hope that helps,

Joe

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