One of the most common thing we used to do in ASP.Net for Web Farm environment for session management was to setup the Session “OutProc” using either state server or SQL Server.
Sitecore also supports the OutProc Session management using SQL. Sitecore has provided a specific database and internally it is managed as well.
This configuration was done using Sitecore 8.0 (XP) or some people say (xDB)
Please find details below to configure the Sitecore Session in SQL.
Steps to do this
- Confirm the database named instancenameSitecore_sessions exist.
- Add a connection string as below
<add name=”sharedsession” connectionString=”user id=sa;password=*******;Data Source=SQLDatabase\SQLEXPRESS;Database=instancenameSitecore_Sessions”/>
- In web.config make a change as below
<sessionState mode=”Custom” cookieless=”false” timeout=”20″ customProvider=”mssql” >
<!–<add name=”mongo” type=”Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB” sessionType=”Standard” connectionStringName=”session” pollingInterval=”2″ compression=”true” />–>
<add name=”mssql” type=”Sitecore.SessionProvider.Sql.SqlSessionStateProvider, Sitecore.SessionProvider.Sql” sessionType=”shared” connectionStringName=”sharedsession” pollingInterval=”2″ compression=”true” />
- connectionStringName should match the name with the connection string specified.
- Run the attached SQL file on your database after replacing your database name in Use Statement and one more place below
Attached is the Docx file which contains the SQL Script provided by Sitecore with installation.
You can find the script in the database folder where you have installed the Sitecore.