1

I have installed EXM 3.4 update 1 on clean Sitecore 8.2 update 2 instance. After completion of post installation steps I am getting below exceptions in log files.

Exception: Sitecore.ExM.Framework.Exceptions.ConnectivityException
Message: Failed to retrieve session information from the session data provider.
Source: Sitecore.ExM.Framework
   at Sitecore.ExM.Framework.Distributed.Sessions.EnvironmentReader.GetSessions(Boolean includeSessionData, Boolean includeRuntimeData, Boolean includeStatistics, Boolean onlyActive, Nullable`1 expirationTimeLimit)
   at Sitecore.ExM.Framework.Distributed.Sessions.EnvironmentReader.GetSessionsByOwner(Boolean includeSessionData, Boolean includeRuntimeData, Boolean includeStatistics)
   at Sitecore.ExM.Framework.Distributed.Sessions.Environment.Maintain()
   at Sitecore.ExM.Framework.Distributed.Sessions.Session.OnSessionUpdateEvent()

Nested Exception

Exception: System.Data.SqlClient.SqlException
Message: Cannot open database "Sitecore_EXM" requested by the login. The login failed.
Login failed for user 'sa'.
Source: .Net SqlClient Data Provider
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Sitecore.ExM.Framework.DataProviders.SqlSessionDataProvider.<>c__DisplayClass1.<GetSessions>b__0()
   at Sitecore.ExM.Framework.DataProviders.SqlUtil.InvokeWithDeadlockRetry[TReturn](Func`1 function, Int32 maxNumberOfAttempts)
   at Sitecore.ExM.Framework.Distributed.Sessions.EnvironmentReader.GetSessions(Boolean includeSessionData, Boolean includeRuntimeData, Boolean includeStatistics, Boolean onlyActive, Nullable`1 expirationTimeLimit)
3

As mentioned in the installation guide on the download page in step 3 of the installation process:

In the App_Config/ConnectionStrings.config file of your Sitecore solution, update the exm.master and the exm.web SQL server connection strings. For example:

<add name="exm.master" connectionString="user id=user;password=password;Data
Source=(server);Database=Sitecore_EXM" />
<add name="exm.web" connectionString="user id=user;password=password;Data
Source=(server);Database=Sitecore_EXM.WEB"/>

Please note that these are just example connection strings, and that you will have to change the user id, password and database name to match your setup.

| improve this answer | |
  • 1
    Even adding these connection string will not help. We also need to rename the databases as default sitecore databases for EXM are attached as Sitecore81_EXM Sitecore81_EXM_Web instead of Sitecore_EXM and Sitecore_EXM.WEB – Mohit Dharmadhikari Apr 4 '17 at 3:11
  • That's why it says "For example" ;) – Jacob Nielsen Apr 4 '17 at 9:26
  • I agree however if someone dumb like me, now he might get help from this question. ;) – Mohit Dharmadhikari Apr 5 '17 at 0:37
  • Fair enough :) I added a note to clarify – Jacob Nielsen Apr 5 '17 at 7:28
  • And I have marked it as Answer! – Mohit Dharmadhikari Apr 5 '17 at 23:26
0

This is because when you attached Sitecore Sitecore_EXM and Sitecore_EXM_WEB databases in SQL Server. They get attached as Sitecore81_EXM and Sitecore81_EXM_WEB, so database names in connection string config and attached databases is mismatched. Either Rename your exm databases in config file to match exactly same as attached dbs in SQL server or rename SQL server dbs to match exactly same as per config file to fix this issue. Hope this helps!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.