Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...The stored procedure The stored procedure 'dbo.GetPortalAliasByPortalID' doesn't exist.
Previous
 
Next
New Post
10/31/2009 8:30 PM
 

Hello everyone.

I have a DNN install that I have been using for some time now. I am trying to get it moved to a new dedicated server. I have the site files running on the new server but have kept the same connection string and using the SQL DB on the old server without any problems. I am now trying to move the SQL DB to my new server. I created a blank DB in SQL Manager and Imported the data from the running database. Everything seemed to import without any errors but when I try to load the site I get the error below. I have googled this and read many posts about it. I have checked my connection string and everything seems correct as far as I know. The worst part is my old provider seems to have turned everything off and skipped town. (I will NEVER use Host Department again!!!!) Anyway, I now do not have access to the old database and my site is not loading at all so I have to get this working somehow, fast!!

My server uses MS SQL 2005. My connection string:

<add name="SiteSqlServer" connectionString="Data Source=97.74.*.*,1433;Network Library=DBMSSOCN;Initial Catalog=pgt_main;User Id=dbname;Password=dbpwd;" providerName="System.Data.SqlClient" />
    

Error:

Server Error in '/pgt' Application.

The stored procedure 'dbo.GetPortalAliasByPortalID' doesn't exist.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The stored procedure 'dbo.GetPortalAliasByPortalID' doesn't exist.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The stored procedure 'dbo.GetPortalAliasByPortalID' doesn't exist.]
   System.Data.SqlClient.SqlCommand.DeriveParameters() +947206
   System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) +88
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +212
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +303
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +154
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +36
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +200
   DotNetNuke.Data.SqlDataProvider.GetPortalAliasByPortalID(Int32 PortalID) +87
   DotNetNuke.Entities.Portals.PortalAliasController.GetPortalAliasByPortalID(Int32 PortalID) +35
   DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasLookup() +74
   DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasInfo(String PortalAlias) +14
   DotNetNuke.HttpModules.UrlRewriteModule.RewriteUrl(HttpApplication app) +3342
   DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +1180
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434

 
New Post
10/31/2009 9:03 PM
 

Hi,

 

bestway to change the SQL Server is to make a backup of the database on the old SQL Server and transfer the backup file to the new SQL Server.  On the new SQL Server you can restore the backup file.  Then check if the dbo user in your db and/or the database user have also added a login name (check the security in the Database folders).

To change the dbo user you can run sp_changedbowner 'sa' in the SQL Management Studio (Express). 

To change the the users login you can run sp_changeuserslogin 'Update_One', 'user1', 'login1' also in the SQL Management Studio.

If the db users didn't have a login name added (it is a user with SQL Server acces, you can add on Security on the SQL Server) you couldn't login to your database.  On restore the backup, the backup didn't recreate the users to the SQL Server about only the Database with it's added users are saved to the backup.  So on restore the login name is missing.

 

 
New Post
10/31/2009 9:28 PM
 

Thank you Matthias,

I do have a MS SQL user set up in SQL Manager which is already set as dbo so there has to be some other problem.

 
New Post
11/1/2009 10:12 AM
 

Does anyone have any other sugestions? I do not have access to my old database any more due to a crapy hosting company!! I really need to get this database working ASAP!!!

 
New Post
11/1/2009 4:18 PM
 

i've had this happen to me once. that would be because of the database

to go down my checklist.

  1. Are you able to connect to your Database using the exact details in MSSQL Mgmt Studio?
  2. Is your database complete? View it visually and try searching for that Stored Procedure.

since you've created and imported data, it logically should work. coupled with the connection details. it even more should work! Usually this happens cause the database had an error installing... you weren't installing DNN were you? 

 

 

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...The stored procedure The stored procedure 'dbo.GetPortalAliasByPortalID' doesn't exist.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out