moving database

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.
11/19/2013 2:28:22 PM
Gravatar
Total Posts 9

moving database

Hi, i need help!!!!!

I have installed mojo on hosting with database mssql....all ok

Now for administration reason i need to transfer database...

I changed database, and then i correct web.config and user.config with new string connection...

When i try to seen website...i see screen with setup disable....

In logfile "currentlog.config" i see

2013-11-19 21:12:04,969 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
System.Data.SqlClient.SqlException: Invalid object name 'MSSql42668.mp_Sites'.

But in user.config and web.config i writed

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

Someone can help me??

 

 

 

11/19/2013 2:48:27 PM
Gravatar
Total Posts 18439

Re: moving database

problem is that setting is used only when it runs scripts to upgrade the database and is only used in the case where the user on the connection string is not dbo, what happens is it replaces dbo. with the setting in the scripts before it runs the scripts that create the tables and stored procedures. so that setting if you change it isn't going to change the fact that the database already has that prefix in the stored procedures.

I do not have a solution for the problem if the owner prefix is not the same after you moved the database

MSSql42668 is coded into all your stored procedures that were created when the site was first installed because that was the owner prefix at the time.  If your host had let you use dbo this problem would not be happening for you now because you could use a different dbo user in the new database copy.  That is one reason why it is best to use a user that is dbo (database owner) of the database when the site is installed. 

to change it now you would have to actually edit all the procedures manually and there a very lot of them.

11/19/2013 2:57:10 PM
Gravatar
Total Posts 9

Re: moving database

Thanks...a lot ...now i know....

I'l try to recode prefix....

my problem is that host of db make a user MSSql.... and i can't use dbo user.....

 

Again Thanks..

11/19/2013 3:03:25 PM
Gravatar
Total Posts 18439

Re: moving database

I think that in the beginning when the site was first installed if you had used this:

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

instead of

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

then it might have worked because it would have replaced dbo. with empty string instead of with MSSql42668. 

and that might have worked

 

11/20/2013 10:36:50 AM
Gravatar
Total Posts 163

Re: moving database

ciao marcusone, stai girando anche tu su aruba da quanto leggo.

 

contattami se hai problemi, saro felice di aiutarti.

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