ORDS Configuration Multiple database in single tomcat server. 

Introduction:-

Oracle RESTful Data Service (ORDS) is a powerful tool that enables organizations to expose their Oracle database resources as RESTful web services. By combining the robustness of Oracle databases with the flexibility of RESTful architecture, ORDS allows developers to access, manage, and manipulate data in a more standardized and scalable way. This blog post serves as a comprehensive conclusion to our exploration of Oracle RESTful Data Service, summarizing its benefits and impact on modern database-driven applications.

In this blog we can configure multiple databases in single ords configuration and also we can run it in single tomcat server. Below are the steps to configure multiple ords into single tomcat server.

Create directories for ords configuration:- 

Step 1:- Create configuration and logs directory

Cd /u01/oracle/ords

Mkdir -p  conf

Cd conf

Mkdir logs

Step 2:- Ords configuration database 1:- 

Execute below script and mention that java home and ords path  correctly to configure ORDS.

export JAVA_HOME=/u01/app/tomcat_install/java/jdk-13.0.1

export PATH=/u01/app/tomcat_install/java/jdk-13.0.1/bin:$PATH

export ORDS_HOME=/u01/oracle/ords

export ORDS_CONFIG=/u01/oracle/ords/conf

export ORDS_LOGS=${ORDS_CONFIG}/logs

export DB_PORT=1523

export DB_SERVICE=oracle

export SYSDBA_USER=SYS

export SYSDBA_PASSWORD=oracle

export ORDS_PASSWORD=welcome123

 

${ORDS_HOME}/bin/ords –config ${ORDS_CONFIG} install \

–log-folder ${ORDS_LOGS} \

–admin-user ${SYSDBA_USER} \

–db-hostname ${HOSTNAME} \

–db-port ${DB_PORT} \

–db-servicename ${DB_SERVICE} \

–feature-db-api true \

–feature-rest-enabled-sql true \

–feature-sdw true \

–gateway-mode proxied \

–gateway-user APEX_PUBLIC_USER \

–proxy-user \

–password-stdin <<EOF

${SYSDBA_PASSWORD}

${ORDS_PASSWORD}

EOF

 

Step 3:- Copy war file and apex images to tomcat webapps location:-

Create image directory in tomcat webapps location

Cd /u01/oracle/tomcat/apache-tomcat-9.0.73/webapps/

Mkdir i

[oracle@tom ~]$ cd /u01/oracle/apex/images/

[oracle@tom images]$ cp -R * /u01/oracle/tomcat/apache-tomcat-9.0.73/webapps/i

[oracle@tom images]$

[oracle@tom ords]$ cp ords.war /u01/oracle/tomcat/apache-tomcat-9.0.73/webapps/

Step 4:- Create tomcat env and add java_opts variable:-

export JAVA_HOME=/u01/app/tomcat_install/java/jdk-13.0.1

export CATALINA_HOME=/u01/oracle/tomcat/apache-tomcat-9.0.73

export CATALINA_BASE=$CATALINA_HOME

export PATH=/u01/app/tomcat_install/java/jdk-13.0.1/bin:$PATH

export ORDS_CONFIG=/u01/oracle/ords/conf

export JAVA_OPTS=”-Dconfig.url=${ORDS_CONFIG} -Xms1024M -Xmx1024M”

 

Start the tomcat services using startup.sh

Verify the url.

 

Step 5:- Adding another ords connection in new database:-

Mentioned that new database service name listener port correctly

export JAVA_HOME=/u01/app/tomcat_install/java/jdk-13.0.1

export PATH=/u01/app/tomcat_install/java/jdk-13.0.1/bin:$PATH

export ORDS_HOME=/u01/oracle/ords

export ORDS_CONFIG=/u01/oracle/ords/conf

export ORDS_LOGS=${ORDS_CONFIG}/logs

export DB_PORT=1524

export DB_SERVICE=loans

export SYSDBA_USER=SYS

export SYSDBA_PASSWORD=<password>

export ORDS_PASSWORD=<password>

 

${ORDS_HOME}/bin/ords –config ${ORDS_CONFIG} install \

–log-folder ${ORDS_LOGS} \

–admin-user ${SYSDBA_USER} \

–db-hostname ${HOSTNAME} \

–db-pool oracle\

–db-port ${DB_PORT} \

–db-servicename ${DB_SERVICE} \

–feature-db-api true \

–feature-rest-enabled-sql true \

–feature-sdw true \

–gateway-mode proxied \

–gateway-user APEX_PUBLIC_USER \

–proxy-user \

–password-stdin <<EOF

${SYSDBA_PASSWORD}

${ORDS_PASSWORD}

EOF

Step 6:- To check that new connection pool status:-

[oracle@tom loans]$ cd ..

[oracle@tom databases]$ tree

.

├── default

│   ├── pool.xml

│   └── wallet

│       └── cwallet.sso

└── oracle

├── pool.xml

└── wallet

└── cwallet.sso

4 directories, 4 files

Now have two paths available, representing the two connections. The URL will be different, depending on if you configured ORDS

http://<hostname>:<port>/ords/  — 

http://<hostname>:<port>/ords/ords2 

http://<hostname>:<port>/ords/ords3 —

Sample Screens:-

Conclusion:-

Oracle RESTful Data Service, we emphasize the importance of embracing innovative technologies like ORDS to stay competitive in the ever-evolving digital landscape. The combination of Oracle databases with RESTful web services not only improves the development process but also enhances the overall user experience.

In this above blog is very useful to configure multiple ords connections into a single tomcat server.

Recent Posts

Start typing and press Enter to search