With Sitecore 7.5, Sitecore introduces xDB – the new MongoDB based DMS database. But before you say “oh no, yet another technology I have to deal with”, you should know that working with MongoDB is very easy. In fact it is easier than working with SQL Server.
STEP 1: DOWNLOAD MONGODB
Go to http://www.mongodb.org/downloads and download the 64 bit .zip file. Unzip the files in a directory on your computer.
I installed mine at c:\mongodb
STEP 2: SET UP THE SITECORE CONNECTIONSTRINGS.CONFIG
It is very likely that the Sitecore 7.5 (and Sitecore 8.x) connectionstrings.config are already set up correctly. If not look for the following lines, they need to point to your local machine:
<?xml version="1.0" encoding="utf-8"?> <connectionStrings> <!-- Sitecore connection strings. All database connections for Sitecore are configured here. --> ... ... ... <add name="analytics" connectionString="mongodb://localhost/analytics" /> <add name="tracking.live" connectionString="mongodb://localhost/tracking_live" /> <add name="tracking.history" connectionString="mongodb://localhost/tracking_history" /> ... </connectionStrings>
STEP 3: CREATE A .BAT FILE TO START UP MONGO
To start up mongo you need to run mongod.exe with a parameter determining where Mongo should put the database files. Create a .bat file with the following contents:
c:\MongoDB\bin\mongod.exe –dbpath “[yourfilepath]”
Replace c:\MongoDB\bin\ with the path to your Mongo files, and [yourfilepath] with the path to the folder where you would like to put your MongoDB databases.
You will need one .bat file for each of your Sitecore projects, as you would like to store a separate set of files per Sitecore.
STEP 4: START SITECORE AND ENJOY LIFE
To start up Sitecore, you run the .bat file and fire up your Sitecore and you are now running Sitecore with xDB on a local instance.
MORE TO READ:
- Launch Mongo DB with Sitecore Pipelines by Thomas Stern
Great article!
For me it was more convenient to configure MongoDB as a Windows service. So, I should not care about running that bat file every time.
However approach of keeping MongoDB files within appropriate Sitecore solution folder sounds great!
LikeLike
Pingback: Launch Mongo DB with Sitecore Pipelines | iStern Blog
I used what you provided but had a few issues. Here’s what worked for me:
“C:\Program Files\MongoDB 2.6 Standard\bin\mongod.exe” –dbpath “C:\inetpub\wwwroot\testsite\Databases\Mongo”
LikeLike
Interesting, something is stripping double dashes. The dbpath command should have two dashes. Documentation: http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
LikeLike
Great article but i didn’t receive report of web form for marketers.I also give reporting database as sitecore analytic database but i didn’t get form reports.Please give me suggestion what i do…thanks in advance
LikeLike
Pingback: MongoDB Setups für Sitecore – Maku
Why not just run the msi ???
LikeLike
The MSI is inconvenient when you have many instances of Sitecore on the same machine, or when you wish to automate the process. Or when you wish to automatically deploy one Sitecore instance for several developers in a shared environment.
LikeLike
how to make sure Sitecore is using MongoDB. I still have my core, master and web databases pointing to SQL express. what do i need to change so it points to MongoDB?
Thanks for your response.
LikeLike
Your CORE, MASTER and WEB databases are still SQL Server based.
The ANALYTICS database is replaced by a SQL server based REPORTING database (although Sitecore have named that database ANALYTICS, kind of confusing).
The xDB Mongo based databases are therefore ANALYTICS, TRACKING.LIVE, TRACKING.HISTORY. Are you using ECM? Then there is a ECM.DISPATCH database in Mongo as well.
LikeLike
Is there a separate licensing cost for xDB apart from Sitecore itself?
LikeLike
No, xDB is a MongoDB which is Open Source and licensed under GNU AGPL 3.0: http://www.mongodb.org/about/licensing/
LikeLike
I’m not getting any data in Experience profile (Anonymous). Getting data in Experience Analytics.
I have installed mongdb as a service. Using default Connection strings when installed sitecore update3.
Please suggest what would be the root cause of this issue.
LikeLike
If the collections have been created in your MongoDB instance, there is a connection.
But data is only written to xDB when your session ends, which means 20 mins after your user have done nothing. So you either have to set the session timeout to 1 minute or wait at least 20 mins.
LikeLike
Pingback: Sitecore 8 and Tracker.Current.Session.Identify – Overriding expired contact session lock for contact id | Brian Pedersen's Sitecore and .NET Blog
Pingback: 10 Steps to Setup MongoDB as a Windows Service with Sitecore 7.5+ | Sitecore Sandbox
Pingback: Sitecore xDB demystified – Useful mongo database queries – Anders Christian Ellegaard Gjelstrup
Pingback: Sitecore MongoDB blog series: Part 1-Introduction to MongoDB in Sitecore – Ankit Joshi's Sitecore Blog
Pingback: Sitecore 7.5 and MongoDB through different environments | Sitecore Xperiences