An Error Occurred:Invalid object name 'mp_SiteHosts'.

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.
10/31/2011 10:46:02 AM
Gravatar
Total Posts 26

An Error Occurred:Invalid object name 'mp_SiteHosts'.

Hei ciao....

I'm Diego from Milano (italy)
and I like very much MojoPortal...

I was triing to install in aruba hosting ...

I tried the sqlce 4.0 version 2.3.7.0 but I catch an error 

So I tried install version 2.3.6.7 on sql server and it was OK !!!!

So I tried to update to version 2.3.7.0 ... using ftp I have reloaded all the files in the web
and then launching the setup I get this error : >>> ;-)

>

Welcome to mojoPortal Setup

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 e' aggiornato.
1 sito(i) trovati.

....
....

E' in corso la verifica che tutte le funzionalita' siano installate nei siti server admin... - 00:00:00.7032960
An Error Occurred:Invalid object name 'mp_SiteHosts'.
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() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() 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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.SqlParameterHelper.ExecuteScalar() at mojoPortal.Data.DBSiteSettings.GetSiteIdByHostName(String hostName) at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromCache() at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromContext() 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)

 

?? how can i resolve the mistake  ??

;-)

11/25/2011 2:28:02 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

Same problem maybe is why I use .net 3.5 in medium trust?

DB is MsSql

www.coroliricoterreverdiane.it  down and i don't what to do sad

 

Thanks for any help

11/25/2011 3:01:26 PM
Gravatar
Total Posts 18439

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

Hi,

Verify that the table mp_SiteHosts exists.

If you can access the database with a query tool try running this:

ALTER PROCEDURE [dbo].[mp_SiteHosts_SelectSiteIdByHost]

/*
Author:      Joe Audette
Created:    2011-08-24
Last Modified:   2011-11-25

*/

@HostName nvarchar(255)

AS


SELECT COALESCE(
(SELECT TOP 1 SiteID
  FROM [dbo].mp_SiteHosts
  WHERE HostName = @HostName),
    
  (SELECT TOP 1 SiteID FROM [dbo].mp_Sites ORDER BY SiteID)
   )

GO
 

The thing I noticed is that this procedure did not have the [dbo]. prefix on the table name and that might be the cause of the error. So if you can run this alter procedure statement it might fix it.

Hope that helps,

Joe

11/25/2011 3:09:29 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

I will chek right now thanks thanks to be

11/25/2011 3:19:02 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

You right mp_SiteHosts doesnt exist and now i have trade to run the querry but

sime nothing change

this is the result :Changed database context to 'MSSql48252'.

sad

and the error change to this "Invalid object name 'dbo.mp_SiteHosts'.

11/25/2011 3:26:19 PM
Gravatar
Total Posts 18439

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

Is this a new installation or an upgrade? That table is not new it has existed for a long time so if upgrading it should already exist.

11/25/2011 3:30:28 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

Is a upgrade from 2.3.6.7

11/25/2011 3:34:00 PM
Gravatar
Total Posts 18439

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

That doesn't make sense because that table has existed since at least version 2.3.4.8.

You can try creating it:

CREATE TABLE [dbo].[mp_SiteHosts](
[HostID] [int] IDENTITY(1,1) NOT NULL,
[SiteID] [int] NOT NULL,
[HostName] [nvarchar](255) NOT NULL,
[SiteGuid] [uniqueidentifier] NULL,
CONSTRAINT [PK_mp_SiteHosts] PRIMARY KEY CLUSTERED
(
[HostID] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF)
)

GO
 

Hope that helps,

Joe

11/25/2011 3:35:34 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

ops i have found it (i dont anything about mssql) and it is empty

11/25/2011 3:40:00 PM
Gravatar
Total Posts 23

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

I run your querry anyway but new error!!

Invalid object name 'dbo.mp_Sites'.

11/25/2011 3:43:42 PM
Gravatar
Total Posts 18439

Re: An Error Occurred:Invalid object name 'mp_SiteHosts'.

If the table exists and you get that error all I can guess is that the user in your connection string is not a dbo (database owner) but in that case it will get errors on all tables and stored procedures that have the [dbo]. prefix nothing about upgrading should cause that. It means the user doesn't have dbo permission and does not see objects named with [dbo]. prefix.

I would check with your host and ask him to make your user in the database connection string a dbo on the database. I don't know any other solution to fix it. I don't see how it is possible that this is related to an upgrade unless your host changed something at the same time.

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