Oracledb Connection Strings
OracleDB Connection Strings in API Maker
Overview
API Maker requires OracleDB connection details in a specific key–value format within the Secrets object. Unlike some tools, API Maker does not accept a single Oracle connection string URI. You must supply each field separately to ensure compatibility and consistent performance.
Required Format
When configuring OracleDB in API Maker Secrets, use this structure:
oracle: 'server_ip:server_port/oracle_process_name',
oracle_username: 'your_username',
oracle_password: 'your_password',
oracle_privilege: 'SYSDBA' // optional, only if needed
Example – With SYSDBA privilege:
oracle: '192.168.1.100:1521/ORCLPDB',
oracle_username: 'admin',
oracle_password: 'securePass123',
oracle_privilege: 'SYSDBA'
Example – Without special privileges:
Parameters Explained
- server_ip: IP address or hostname of the Oracle database server.
- server_port: Oracle listener port (default:
1521
). - oracle_process_name: Service name or SID from your Oracle configuration.
- oracle_username: Database username.
- oracle_password: Password for the database user.
- oracle_privilege (optional): Set to
SYSDBA
orSYSOPER
only if your connection requires elevated privileges.
Best Practices
- Store all sensitive values in API Maker Secrets.
- Keep formats identical across development, staging, and production.
- Avoid logging credentials.
- Test connections in API Maker before deploying.
- Use the least privilege required – avoid
SYSDBA
unless absolutely necessary.
Unsupported Formats
Do not use:
- Full DSN or TNS descriptor strings.
- JDBC-style URLs (
jdbc:oracle:thin:@...
). - Single URI-style connection strings.
These will not work with API Maker.
Connecting OracleDB in API Maker
- Go to API Maker → Secret Management → Default.
- Select Oracle Database as the database type.
- Enter the connection fields as shown above.
- Test the connection.
-
Once connected, you can:
- Create schemas.
- Use
/api/schema/...
for queries. - Use Deep Populate with other databases.
Troubleshooting
Issue | Possible Cause | Solution |
---|---|---|
Invalid Credentials | Wrong username/password or privilege | Verify username, password, and oracle_privilege if used. |
Connection Timeout | Server unreachable or port blocked | Check server IP/hostname and ensure port 1521 (or custom) is open. |
Service Name/SID Errors | Incorrect oracle_process_name |
Match your Oracle service name or SID exactly as configured. |
Firewall Issues | Network restrictions | Allow inbound traffic on the Oracle listener port. |
FAQs
Q: Do I always need oracle_privilege
?
No. Use it only for privileged accounts like SYSDBA
or SYSOPER
.
Q: Can I use a hostname instead of an IP? Yes, if DNS resolution works in your environment.
Q: What happens if I omit the port?
Port defaults to 1521
.
Q: Can I connect to an Oracle container? Yes. Use the container's network IP or service name and ensure ports are exposed.