Error on creating SQL 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.
7/15/2014 12:37:10 PM
Gravatar
Total Posts 2

Error on creating SQL database

Hi,

I'm new in mojoportal. I have downloaded latest version mojoportal-2-4-0-3-mssql-net40-deploymentfiles , created a website in IIS7, created an empty database in SQL Server2005, I gave folder permissions to necessary accounts, and I've tried to browse the site

It stops and I cannot continue. Is there a way to run manually datbase schema creation to see in query analyser what cause the error?

Below are the errors in browser

Welcome to mojoPortal Setup

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.3.4.8 - 00:00:00.1190069
System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'SiteId'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) 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) ClientConnectionId:07eeca93-cfd6-48cf-8ce3-d86ad96a2b70 - 00:00:00.6850392

BELOW ARE THE CONTENTS OF CURRENTLOG.CONFIG

 

2014-07-15 20:29:00,445 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2014-07-15 20:29:07,556 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2014-07-15 20:29:07,605 ERROR (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'mp_TaskQueue_DeleteCompleted'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters)
   at mojoPortal.Data.DBTaskQueue.DeleteCompleted()
   at mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted)
ClientConnectionId:07eeca93-cfd6-48cf-8ce3-d86ad96a2b70 
2014-07-15 20:29:07,745 ERROR (null) - (null) - (null) - mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:  
System.InvalidOperationException: The stored procedure 'mp_BannedIPAddresses_Exists' doesn't exist.
   at System.Data.SqlClient.SqlCommand.DeriveParameters()
   at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command)
   at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.InitializeArray()
   at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
   at mojoPortal.Data.DBBannedIP.IsBanned(String ipAddress)
   at mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e)
2014-07-15 20:29:07,756 ERROR (null) - (null) - (null) - mojoPortal.Web.UrlRewriter - System.InvalidOperationException: The stored procedure 'mp_SiteHosts_SelectSiteIdByHost' doesn't exist.
   at System.Data.SqlClient.SqlCommand.DeriveParameters()
   at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command)
   at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.InitializeArray()
   at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
   at mojoPortal.Data.DBSiteSettings.GetSiteIdByHostName(String hostName)
   at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromCache()
   at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromContext()
   at mojoPortal.Web.UrlRewriter.GetRedirectUrl(String targetUrl)
   at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
   at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) 
2014-07-15 20:29:07,794 ERROR (null) - (null) - (null) - mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:  
System.InvalidOperationException: The stored procedure 'mp_BannedIPAddresses_Exists' doesn't exist.
   at System.Data.SqlClient.SqlCommand.DeriveParameters()
   at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command)
   at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.InitializeArray()
   at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
   at mojoPortal.Data.DBBannedIP.IsBanned(String ipAddress)
   at mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e)
2014-07-15 20:29:11,108 INFO 127.0.0.1 - el-GR - / - mojoPortal.Web.mojoBasePage - no sites or no database found in application error so try to redirect to Setup Page 
2014-07-15 20:29:11,143 ERROR (null) - (null) - (null) - mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:  
System.InvalidOperationException: The stored procedure 'mp_BannedIPAddresses_Exists' doesn't exist.
   at System.Data.SqlClient.SqlCommand.DeriveParameters()
   at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command)
   at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.InitializeArray()
   at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
   at mojoPortal.Data.DBBannedIP.IsBanned(String ipAddress)
   at mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e)
2014-07-15 20:29:11,144 ERROR (null) - (null) - (null) - mojoPortal.Web.UrlRewriter - System.InvalidOperationException: The stored procedure 'mp_SiteHosts_SelectSiteIdByHost' doesn't exist.
   at System.Data.SqlClient.SqlCommand.DeriveParameters()
   at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command)
   at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
   at mojoPortal.Data.SqlParameterHelper.InitializeArray()
   at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
   at mojoPortal.Data.DBSiteSettings.GetSiteIdByHostName(String hostName)
   at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromCache()
   at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromContext()
   at mojoPortal.Web.UrlRewriter.GetRedirectUrl(String targetUrl)
   at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
   at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) 
2014-07-15 20:29:11,833 ERROR 127.0.0.1 - el-GR - /Setup/Default.aspx - mojoPortal.Data.DBPortal - dbPortal.RunScript failed 
System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'SiteId'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   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)
ClientConnectionId:07eeca93-cfd6-48cf-8ce3-d86ad96a2b70
2014-07-15 20:29:11,834 INFO 127.0.0.1 - el-GR - /Setup/Default.aspx - mojoPortal.Data.DBPortal - last script statement was 
CREATE PROCEDURE [dbo].[mp_Modules_SelectBySite]

/*
Author:                Joe Audette
Created:            2009-01-04
Last Modified:        2009-03-26

*/

@SiteID        int,
@FeatureGuid uniqueidentifier


AS
SELECT          m.ModuleID,
                m.ModuleTitle,
                m.AuthorizedEditRoles,
                p.Url,
                p.PageName,
                p.UseUrl,
                p.PageID,
                p.EditRoles
    
FROM
                mp_Modules m
  
JOIN        mp_ModuleDefinitions md
ON             m.ModuleDefID = md.ModuleDefID

JOIN        mp_PageModules pm
ON                m.ModuleID = pm.ModuleID

JOIN        mp_Pages p
ON            pm.PageID = p.PageID
    
WHERE   
                md.Guid = @FeatureGuid
                AND m.SiteId=@SiteID
        
    
ORDER BY p.PageName, m.ModuleTitle

7/15/2014 12:46:39 PM
Gravatar
Total Posts 18444

Re: Error on creating SQL database

 

I think the problem is because you are using a case sensitive collation on the database so it doesn't like this:

AND m.SiteId=@SiteID

because m.SiteID is the actual case of the column.

I suggest:

1. make sure you have all of the service paks for sql 2005 installed, anything less than that is not supported

2. try again but create a new database using a case insensitive collation instead of a case sensitive one

7/16/2014 10:11:50 AM
Gravatar
Total Posts 2

Re: Error on creating SQL database

Hi Joe,

Thanks for your reply. Actually Case Sensitive on db was causing the error. I've created a new one with CI collation and it worked

Cheers

 

 

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