Oracle
Oracle Database is a widely used relational database management system (RDBMS) developed by Oracle Corporation. Known for its scalability, reliability, and powerful features, Oracle Database is used across various industries for managing large-scale data. When integrating Oracle with Martini Runtime, you can leverage its JDBC capabilities to connect and perform high-performance data operations. This combination ensures efficient handling of complex queries and data analytics, enabling robust and scalable data workflows within your Martini environment.
Configuring Oracle Database
To connect Martini Runtime to Oracle Database, you'll need to configure a JDBC connection string, which includes details such as the Oracle server’s host, port, and authentication credentials. This ensures smooth communication between Martini Runtime and your Oracle database, enabling seamless data integration. Here’s a guide to setting up a new database connection:
Configuration Guide
Via API Explorer: Database connections can be configured using the Martini API Explorer, a user-friendly interface designed to interact with the system’s APIs. Follow these steps to configure Oracle database connections through the API Explorer:
-
Access the API Explorer: Open a web browser and go to
[HOST]:8080/api-explorer/
to access the API Explorer. -
Navigate to the Database Tag: Locate and click on the
database
tag within the API Explorer to view various database configuration and operation endpoints. -
Configure Connection Pool: Use the
esbapi/databases
endpoint under the database tag to save a database connection pool. -
Use POST to Save a Connection Pool: Save the connection pool by using the POST method at the
/esbapi/databases
endpoint. Here is a minimum requirement for a JSON payload:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
{ "name": "[name]", "autoStart": true, "status": "STARTED", "type": "jdbc", "url": "jdbc:oracle:thin:@[HOST]:[PORT]:[SID]", "xa": false, "driverClassName": "oracle.jdbc.driver.OracleDriver", "username": "[username]", "password": "[password]", "acquireIncrement": 1, "acquisitionInterval": 1, "acquisitionTimeout": 30, "allowLocalTransactions": true, "autoCommit": true, "applyTransactionTimeout": false, "automaticEnlistingEnabled": true, "deferConnectionRelease": false, "enableJdbc4ConnectionTest": false, "ignoreRecoveryFailures": false, "isolationLevel": "READ_COMMITTED", "maxIdleTime": 60, "minPoolSize": 0, "maxPoolSize": 5, "preparedStatementCacheSize": 0, "shareTransactionConnections": false, "twoPcOrderingPosition": 0, "useTmJoin": true, "loginTimeout": 0 }
Replace [HOST]
, [PORT]
, and [SID]
with your Oracle database details.
Via File System:
Alternatively, database connections can be modified directly in the file system by editing the <name>.dbxml
file located in the /<martini-home>/conf/db-pool/
directory. The <name>.dbxml
file refers to the specific file for your Oracle database configuration. This method is particularly useful in environments with restricted API access or during initial setup stages.
To modify database connections directly through the file system, follow these steps:
-
Locate the Configuration File: Navigate to the
/<martini-home>/conf/db-pool/
directory on your server and locate the<name>.dbxml
file. -
Edit the Database Connections: Open the
<name>.dbxml
file in a text editor and modify the database connection properties. -
Save and Restart: After making the desired changes, save the file. It is essential to restart the Martini Runtime instance to apply the new settings. This ensures that all components of the application use the updated JDBC configuration. Here is a minimum requirement for a dbXML:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<database> <name>[name]</name> <autoStart>true</autoStart> <type>jdbc</type> <url>jdbc:oracle:thin:@[HOST]:[PORT]:[SID]</url> <xa>false</xa> <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName> <username>[username]</username> <password>[encrypted_password]</password> <acquireIncrement>1</acquireIncrement> <acquisitionInterval>1</acquisitionInterval> <acquisitionTimeout>30</acquisitionTimeout> <allowLocalTransactions>true</allowLocalTransactions> <autoCommit>true</autoCommit> <applyTransactionTimeout>false</applyTransactionTimeout> <automaticEnlistingEnabled>true</automaticEnlistingEnabled> <deferConnectionRelease>false</deferConnectionRelease> <enableJdbc4ConnectionTest>false</enableJdbc4ConnectionTest> <ignoreRecoveryFailures>false</ignoreRecoveryFailures> <isolationLevel>READ_COMMITTED</isolationLevel> <maxIdleTime>60</maxIdleTime> <minPoolSize>0</minPoolSize> <maxPoolSize>5</maxPoolSize> <preparedStatementCacheSize>0</preparedStatementCacheSize> <shareTransactionConnections>false</shareTransactionConnections> <twoPcOrderingPosition>0</twoPcOrderingPosition> <useTmJoin>true</useTmJoin> <loginTimeout>0</loginTimeout> </database>
-
Save and Restart
Save the changes and restart Martini Runtime to apply the updated settings.
Configuring Oracle in Martini Designer
-
Access the Database Connection Manager
In Martini Designer's Navigator view, click on the Databases icon to view the available database connections and queries. -
Create a New Connection
- Right-click on Connections and select New Connection.
-
Specify a name for the connection and select the database type as
JDBC
. -
Provide Connection Details
- Enter the host, port, database (SID or service name), username, and password.
-
Specify the JDBC driver as
oracle.jdbc.driver.OracleDriver
by clicking on the Browse button. -
Test the Connection
Use the Test Connection button to validate the connection. Ensure the connection is successful. -
Save the Configuration
Save your settings to finalize the connection.
Connection Properties
For more details on constructing a JDBC connection URL for Oracle, you can refer to the official documentation: Oracle JDBC Connection URL.
Database Properties
These properties include various settings that control the operation of the Oracle database connection. For detailed information on configuring these settings, refer to the JDBC database properties documentation.