I have installed Sitecore 9.2 XP0 Single Machine instance, using MS SQL Server for xDB. Now I have a requirement to replace MS SQL Server with Mongo DB for xDB. I have installed Mongo DB 4.0.5, as per the compatibility table. I need help on further steps on how to set this up. Do I need to manually create any DB instance inside Mongo DB, or are there any scripts for that?
1 Answer
MongoDB is an open-source database management system (DBMS), usually called NoSQL database that uses a document-oriented database model which supports various forms of data. It means you don't need to create any table or database also you don't need to run/create any script for this.
All you need to do some configuration changes, because the default Sitecore is configure with MSSQL. You can find the configuration changes in Installation Guide for the XP Scaled topology
file under the 9.2 download section- https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/92/Sitecore_Experience_Platform_92_Initial_Release.aspx
Basic steps are as follow -
NOTE: The follow are done in the xConnect site (xconnect\App_Data\Config\Sitecore\Collection
) and the Indexing service (xconnect\App_Data\jobs\continuous\IndexWorker\App_data\config\sitecore\Collection
)
- Enable the
sc.Xdb.Collection.Data.MongoDb.xml.disabled
configuration file by removing .disabled extension. - Disable the
sc.Xdb.Collection.Data.Sql.xml
configuration file by adding the .disabled - Update the collection connection string to point to the MongoDB instance. It will look like this
<add name="collection" connectionString="mongodb://127.0.0.1:27017/usms_collection" />
You must also update the collection connection string in the indexer job that exists under the following roles: - Rebuild the xDB search indexes in Solr. See the section Rebuild the Search Indexes in the link
-
1