Hello,
I want to know any database connection with AEM. i am new to AEM if any one have solution .please let me know. Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @prachishingade ,
Apart from the links shared by @pulkitvashisth you can refer to the below links for a complete tutorial.
https://medium.com/@theopendle/aem-connect-aem-to-an-external-database-oracle-example-4d3b9d43708
Git: https://github.com/theopendle/aem-demo/commit/2e642538915b00896e3d9dc3f7aa46e521f40862#diff-5a7855b3...
Let me know if you need something else
Hi @prachishingade ,
Adobe Experience Manager (AEM) primarily uses Apache Jackrabbit Oak as its underlying repository, and it's designed to work with a variety of data stores, including both file-based and RDBMS-based repositories. By default, AEM uses a file-based repository for persistence (CRXde). However, for larger deployments or specific use cases, you might consider using an RDBMS (Relational Database Management System) as the persistence layer for AEM.
Here are the general steps to configure AEM to use an RDBMS:
Choose a Database: Select an RDBMS that is supported by Adobe Experience Manager. Common choices include Apache Derby, Oracle, Microsoft SQL Server, and PostgreSQL.
Configure the DataSource: Configure a DataSource in your application server that AEM will use to connect to the RDBMS. This is typically done in the application server's configuration. You may need to provide connection details such as the database URL, username, and password.
Install Database Drivers: Ensure that the necessary JDBC driver for your chosen database is available in the AEM environment. The JDBC driver is needed to establish a connection between AEM and the database.
Configure AEM for RDBMS: Modify the AEM configuration to use the configured DataSource. This involves updating the repository configuration to point to the DataSource, usually through the Apache Jackrabbit Oak configuration.
Recreate the Repository: Depending on your scenario, you might need to recreate the AEM repository to apply the new configuration. Be cautious with this step, especially in a production environment, as recreating the repository will result in data loss.
Testing: After configuring AEM for the RDBMS, thoroughly test the setup to ensure proper functionality and performance. Pay attention to potential issues during the transition.
It's important to note that using an RDBMS introduces additional complexity and considerations. The decision to switch to an RDBMS should be made based on specific requirements and considerations, such as scalability, performance, and maintenance.
Thanks for reply.
can please provide link how to Configure the DataSource and Configure AEM for RDBMS .
Hi @prachishingade , please check as I have tried to summarize from the references :
1. Configure the DataSource: (reference : https://experienceleague.adobe.com/docs/experience-manager-learn/forms/sign-multiple-documents/confi...)
- Go to AEM web console at `https://server:host/system/console/configMgr`.
- Look for Apache Sling Connection Pooled DataSource configuration.
- Select to open the configuration in edit mode.
- In the configuration dialog, specify the details for the database you want to configure, such as:
- Name of the data source
- Data source service property that stores the data source name
- Java class name for the JDBC driver
- JDBC connection URI
- Username and password to establish connection with the JDBC driver.
https://experienceleague.adobe.com/docs/experience-manager-65/content/forms/form-data-model/configur...
2. Configure AEM for RDBMS: (reference : https://experienceleague.adobe.com/docs/experience-manager-65/content/implementing/deploying/deployi...)
- Make sure the database daemon is started and that you have an active database for use with AEM.
- Copy the AEM 6.3 jar into the installation directory.
- Create a folder called `crx-quickstart\\install` in the installation directory.
- Configure the document node store by creating a configuration file with the following name in the `crx-quickstart\\install` directory: `org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config`.
- Configure the data source and the JDBC parameters by creating another configuration file with the following name in the `crx-quickstart\\install` folder: `org.apache.sling.datasource.DataSourceFactory-oak.config`.
- In the `crx-quickstart/install` folder, create a folder named `9`. Place the JDBC jar in the new folder.
- Finally, start AEM with the `crx3` and `crx3rdb` runmodes: `java -jar quickstart.jar -r crx3,crx3rdb`.
Hi @prachishingade ,
Apart from the links shared by @pulkitvashisth you can refer to the below links for a complete tutorial.
https://medium.com/@theopendle/aem-connect-aem-to-an-external-database-oracle-example-4d3b9d43708
Git: https://github.com/theopendle/aem-demo/commit/2e642538915b00896e3d9dc3f7aa46e521f40862#diff-5a7855b3...
Let me know if you need something else
There are 2 common ways to create a data source (separate OSGI Configs that you can access from the system console (http://localhost:4502/system/console/configMgr) -
The Apache Sling Connection Pooled data source is the recommended one because how it handles the idle connections.
Here is the documentation for connecting AEM to a database - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/sign-multiple-documents/confi...
If you are on AEM as a Cloud Service, there would be some additional networking configurations involved as well which are documented here - https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/networking/advanced-n...
As you can see there are multiple steps involved so you can try these and reach out to the community for any questions.
Thanks
Narendra
@prachishingade Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes