EPiServer Mail 5 R2: The stored procedure ‘spEPiServerMailSampleRecipientSourceGetMailingLists’ doesn’t exist

Posted on June 2, 2011 by Frederik Vig in EPiServer

After completing the installation of EPiServer Mail 5 R2 (see my previous post: EPiServer Mail 5 R2 Installation problem). Everything seemed to be going fine, except for in edit mode. After the installation, when I tried editing a page, I got the following error message in edit mode (standard EPiServer CMS 6 R2 with EPiServer Mail 5 R2):

[InvalidOperationException: The stored procedure 'spEPiServerMailSampleRecipientSourceGetMailingLists' doesn't exist.]
   System.Data.SqlClient.SqlCommand.DeriveParameters() +2840515
   System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) +241
   Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.DeriveParameters(DbCommand discoveryCommand) +72
   Microsoft.Practices.EnterpriseLibrary.Data.Database.DiscoverParameters(DbCommand command) +194
   Microsoft.Practices.EnterpriseLibrary.Data.ParameterCache.SetParameters(DbCommand command, Database database) +132
   Microsoft.Practices.EnterpriseLibrary.Data.Database.GetStoredProcCommand(String storedProcedureName, Object[] parameterValues) +135
   EPiServer.Common.Data.DatabaseHandler.GetCommand(Boolean inTransaction, String sp, CommandType commandType, Object[] args) +208
   EPiServer.Common.Data.DatabaseHandler.GetReader(Boolean inTransaction, String sp, CommandType commandType, Object[] args) +32
   EPiServer.Common.Data.DatabaseHandler.GetReader(Boolean inTransaction, String sp, Object[] args) +26
   EPiServer.Mail.Sources.SampleSource.SampleSource.GetRecipientContainers(ISite site, Int32 page, Int32 pageSize, Int32& totalItems, RecipientContainerSortOrder[] order) +302
   EPiServer.Mail.Core.EP.Web.ComposeNewMailControl.BindRecipientContainers() +480
   EPiServer.Mail.Core.EP.Web.ComposeNewMailControl.InitializeRecipientsSection() +789
   EPiServer.Mail.Core.EP.Web.ComposeNewMailControl.Page_Init(Object sender, EventArgs e) +72
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.InitRecursive(Control namingContainer) +133
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Control.InitRecursive(Control namingContainer) +421
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1954

After looking a little at the stack trace and at the download section of EPiServer World I noticed the code sample for EPiServer Mail. After downloading the files I found two sql-scripts (EPiServerMailSampleRecipientSource_stored_procedures.sql and EPiServerMailSampleRecipientSource_tables.sql) that add a couple of tables and stored procedures that you apparently need. After executing both sql-scripts in my EPiServer Mail database everything worked fine again, and I was able to access edit mode.

Related Posts: