Skip to content

Oracle Database Connection Strings in API Maker

Introduction

When connecting Oracle Database to API Maker, proper configuration defines how your API Maker instance communicates with your Oracle database. Whether you're using Oracle Autonomous Database, a self-hosted Oracle instance, or a cloud provider's managed Oracle service, the correct connection parameters are essential for secure and reliable data access.

In this guide, we'll explain connection formats, parameters, examples, troubleshooting tips, and best practices to help you integrate Oracle Database with API Maker effectively.


Oracle Connection Format in API Maker

Unlike traditional Oracle connection strings, API Maker requires Oracle connection details in a specific key-value format within the Secrets object. Below is a visual breakdown of the required format.

Connection Format Breakdown

oracle: 'server_ip:server_port/oracle_process_name',
oracle_username: 'your_username',
oracle_password: 'your_password',
oracle_privilege: 'SYSDBA' // optional, only if needed
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Oracle Connection Format  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
oracle: 'server_ip:server_port/oracle_process_name'
  β”‚        └─ Server IP ── Port (1521) ── Service/SID 
  β”‚                                     
oracle_username: 'your_username'
  β”‚
oracle_password: 'your_password'
  β”‚
oracle_privilege: 'SYSDBA' (optional)

Connection Parameters Explained

Parameter Description Required Example Value Notes
oracle Server connection string in format ip:port/service_name βœ… Yes 192.168.1.100:1521/ORCLPDB Combines host, port, and service name
oracle_username Database username for authentication βœ… Yes appuser, hr, admin Should match Oracle user account
oracle_password Password for the database user βœ… Yes securePass123 Store securely in API Maker Secrets
oracle_privilege Optional administrative privilege ❌ No SYSDBA, SYSOPER Use only when required for elevated access

Oracle Connection Examples

Basic Connection (Standard User)

oracle: '192.168.1.100:1521/ORCLPDB',
oracle_username: 'appuser',
oracle_password: 'mySecurePass123'

Connection with Default Port (1521)

oracle: 'oracle.company.com/XEPDB1',
oracle_username: 'hr_user',
oracle_password: 'hrPass456'

Connection with Custom Port

oracle: '10.0.0.50:1522/TESTDB',
oracle_username: 'test_user',
oracle_password: 'testPass789'

Administrative Connection (SYSDBA)

oracle: '192.168.1.100:1521/ORCLPDB',
oracle_username: 'sys',
oracle_password: 'sysPassword',
oracle_privilege: 'SYSDBA'

Connection with SYSOPER Privilege

oracle: 'prod-oracle.internal:1521/PRODDB',
oracle_username: 'backup_admin',
oracle_password: 'backupPass123',
oracle_privilege: 'SYSOPER'

Oracle Autonomous Database (Cloud)

oracle: 'adb.us-east-1.oraclecloud.com:1522/myatp_high',
oracle_username: 'admin',
oracle_password: 'AutonPass123'

Multi-Tenant Container Database (CDB)

oracle: 'oracle-cdb.company.com:1521/CDB1',
oracle_username: 'c##global_user',
oracle_password: 'globalPass456'

Oracle Express Edition (XE)

oracle: 'localhost:1521/XE',
oracle_username: 'app_user',
oracle_password: 'localPass789'

Oracle RAC Connection (Single Node)

oracle: 'rac-node1.company.com:1521/RACDB',
oracle_username: 'rac_user',
oracle_password: 'racPass123'

Development Environment with Custom SID

oracle: 'dev-oracle:1521/DEVSID',
oracle_username: 'developer',
oracle_password: 'devPass456'

Oracle Cloud Infrastructure (OCI) Connection

oracle: 'db.us-phoenix-1.oraclecloud.com:1521/pdb1_phx',
oracle_username: 'oci_user',
oracle_password: 'ociSecurePass789'

Connection Parameters Detailed Breakdown

Core Parameters

Parameter Format Description Example Values
Server IP/Hostname hostname or ip_address Oracle database server address localhost, 192.168.1.100, oracle.company.com
Port :port_number Oracle listener port (default: 1521) :1521, :1522, :1525
Service Name/SID /service_name Oracle service identifier /ORCLPDB, /XE, /XEPDB1, /CDB1
Username string Database user account hr, appuser, sys, c##common_user
Password string User account password Must be stored in API Maker Secrets
Privilege SYSDBA or SYSOPER Administrative privileges Only use when necessary

Oracle Service Types

Service Type Format Description Use Case
Pluggable Database (PDB) host:port/pdb_name Modern multi-tenant architecture Most common in Oracle 12c+
Container Database (CDB) host:port/cdb_name Root container database Administrative operations
Traditional SID host:port/sid_name Legacy service identifier Older Oracle versions
Express Edition host:port/XE Oracle XE service Development/testing

Secure Connection Best Practices

Security Guidelines

  • Always store credentials in API Maker Secrets Management - Never hardcode passwords
  • Use least privilege principle - Avoid SYSDBA/SYSOPER unless absolutely required
  • Implement strong passwords - Use complex passwords with numbers, symbols, and mixed case
  • Enable Oracle wallet authentication when possible for enhanced security
  • Use dedicated database users for application connections, not shared accounts
  • Regularly rotate passwords and update API Maker secrets accordingly

Network Security

  • Configure Oracle listener security - Restrict listener access to authorized hosts
  • Use VPN or private networks - Avoid exposing Oracle directly to the internet
  • Enable Oracle Network Encryption - Encrypt data in transit
  • Implement firewall rules - Allow only necessary ports (typically 1521)
  • Monitor connection logs - Track access patterns and failed login attempts

Connecting Oracle Database in API Maker

Step-by-Step Connection Process

  1. Go to API Maker Secret Management β†’ Default
  2. Choose Oracle Database as the database type
  3. Enter connection parameters:
    • Oracle connection string in the specified format
    • Username and password
    • Optional privilege level
  4. Test the connection to verify credentials and accessibility
  5. Save the configuration once connection is successful

Once Connected, You Can:

  • Create schemas for Oracle tables and views
  • Use /api/schema/... endpoints for optimized Oracle queries
  • Leverage Deep Populate to join Oracle data with other databases
  • Execute complex Oracle procedures and functions
  • Access Oracle-specific data types like CLOB, BLOB, XMLType
  • Utilize Oracle advanced features like materialized views and partitions

Troubleshooting

When connecting to Oracle Database (local, self-hosted, or cloud), you may encounter several common errors. Below is a categorized list with explanations and solutions:

Authentication & Authorization Errors

Error Code Name Description Common Fix
ORA-01017 Invalid username/password Incorrect credentials provided Verify username, password, and case sensitivity
ORA-01031 Insufficient privileges User lacks required permissions Grant appropriate roles or use privileged account
ORA-28000 Account is locked User account has been locked Unlock account: ALTER USER username ACCOUNT UNLOCK;
ORA-28001 Password has expired User password needs to be changed Change password: ALTER USER username IDENTIFIED BY newpass;
ORA-01045 User lacks CREATE SESSION privilege Cannot establish session Grant session privilege: GRANT CREATE SESSION TO username;
ORA-00942 Table or view does not exist Insufficient object privileges Grant table access or verify object name

Network & Connectivity Errors

Error Code Name Description Common Fix
ORA-12541 TNS:no listener Oracle listener is not running Start Oracle listener service
ORA-12545 Connect failed (host unreachable) Cannot reach database server Check network connectivity and firewall
ORA-12154 TNS:could not resolve service name Service name not found in tnsnames.ora Verify service name or use direct connection format
ORA-12514 TNS:listener does not know of service Service name not registered with listener Check service registration or restart database
ORA-12170 TNS:Connect timeout occurred Connection attempt timed out Check network latency, increase timeout, or verify server status
ORA-12560 TNS:protocol adapter error Local connection protocol issue Verify Oracle client installation and environment variables

Database & Instance Errors

Error Code Name Description Common Fix
ORA-01034 Oracle not available Database instance is not started Start the Oracle database instance
ORA-01089 Immediate shutdown in progress Database shutting down Wait for shutdown to complete, then restart
ORA-00257 Archiver error Archive log destination full Clear archive log space or increase storage
ORA-01033 Oracle initialization in progress Database still starting up Wait for database startup to complete
ORA-00020 Maximum number of processes exceeded Too many concurrent connections Increase PROCESSES parameter or close unused connections
ORA-00018 Maximum number of sessions exceeded Session limit reached Increase SESSIONS parameter or terminate idle sessions

SSL/TLS & Security Errors

Error Code Name Description Common Fix
ORA-29024 Certificate validation failure SSL certificate issues Verify certificate chain and validity
ORA-29040 Encryption or crypto-checksumming error SSL/TLS handshake failed Check SSL configuration and cipher compatibility
ORA-12629 Network Data Encryption error Encryption negotiation failed Verify encryption settings match client/server
ORA-28040 No matching authentication protocol Client/server authentication mismatch Update client or server authentication settings

Performance & Resource Errors

Error Code Name Description Common Fix
ORA-00604 Error occurred at recursive SQL level Internal recursive operation failed Check underlying cause and system resources
ORA-04031 Unable to allocate memory Shared pool or SGA memory exhausted Increase SGA_MAX_SIZE or restart database
ORA-01652 Unable to extend temp segment Temporary tablespace full Add space to temporary tablespace
ORA-01653 Unable to extend table Tablespace full Add datafiles or increase tablespace size
ORA-12505 TNS:listener does not know of SID SID not registered or misspelled Verify SID name or use service name instead

Cloud Provider Specific Errors

Error Code Name Description Common Fix
ORA-00001 Unique constraint violated Duplicate key in cloud environment Handle duplicates in application logic
Cloud-001 Oracle Cloud connection timeout OCI-specific timeout Check OCI network configuration and security lists
ATP-001 Autonomous DB wallet required Missing wallet for ATP/ADW connection Download and configure Oracle wallet
RDS-001 RDS Oracle parameter group issue AWS RDS configuration problem Modify RDS parameter group or contact AWS support

FAQ

Q1: Can I use Oracle Express Edition (XE) with API Maker?
Yes, Oracle XE works perfectly with API Maker. Use the service name XE in your connection string.

Q2: What's the difference between service name and SID?
Service names are the modern approach (Oracle 9i+) and support multiple instances. SIDs are legacy identifiers for single instances. Use service names when possible.

Q3: Does API Maker support Oracle RAC (Real Application Clusters)?
Yes, you can connect to individual RAC nodes. For high availability, consider connection pooling at the application level.

Q4: Can I use Oracle Autonomous Database with API Maker?
Yes, Oracle Autonomous Database works with API Maker. Use the provided connection details from the Oracle Cloud Console.

Q5: Do I always need the oracle_privilege parameter?
No, only use it for administrative operations requiring SYSDBA or SYSOPER privileges. Regular application users don't need it.

Q6: Can I use a hostname instead of an IP address?
Yes, as long as DNS resolution works in your environment. Hostnames are often preferred for cloud deployments.

Q7: What happens if I omit the port number?
Oracle defaults to port 1521. If your listener uses a different port, you must specify it.

Q8: Can I connect to Oracle in a Docker container?
Yes, use the container's network IP or published port mapping. Ensure the Oracle listener is configured to accept external connections.

Q9: Does API Maker support Oracle PL/SQL procedures?
Yes, you can execute stored procedures and functions through API Maker's schema endpoints.

Q10: Can I connect to multiple Oracle databases simultaneously?
Yes, configure different Oracle connections in separate API Maker secret configurations.


List of Oracle Cloud Service Providers

Oracle Cloud Infrastructure (OCI)

  • Official Oracle cloud platform
  • Services: Autonomous Database, Base Database Service, Exadata Cloud Service
  • Features: Auto-scaling, automated patching, built-in security, machine learning
  • https://www.oracle.com/in/cloud/

API Maker Cloud

  • Provides one-click Oracle Database installation with latest versions
  • Runs on dedicated VPS of your choice, budget-friendly options available
  • Can install Oracle with API Maker's server to save costs significantly
  • Great choice for self-hosted Oracle with flexible scaling options
  • https://cloud.apimaker.dev

Amazon RDS for Oracle

  • Managed Oracle service by AWS
  • Features: Multi-AZ deployments, automated backups, read replicas
  • Integrated with AWS ecosystem (IAM, VPC, CloudWatch, Lambda)
  • https://aws.amazon.com/rds/oracle/

Microsoft Azure Database for Oracle

Google Cloud Oracle Solutions

IBM Cloud for Oracle

  • IBM Cloud Virtual Servers for Oracle
  • Features: Bare metal servers, high-performance storage
  • Integrated with IBM Cloud services and AI capabilities
  • https://www.ibm.com/cloud/oracle

ScaleGrid

  • Fully managed database hosting (Oracle, MySQL, PostgreSQL, MongoDB, Redis)
  • Supports hosting on AWS, Azure, GCP, DigitalOcean
  • Features: Custom backups, dedicated servers, SSH access, monitoring
  • https://scalegrid.io/

Rackspace Managed Oracle

Oracle Cloud Marketplace Partners

Aiven

  • Multi-cloud database service provider
  • Supports Oracle alongside PostgreSQL, MySQL, Kafka, Redis
  • Runs on AWS, Azure, GCP, DigitalOcean, UpCloud
  • https://aiven.io/

Instaclustr (by NetApp)

  • Managed data platform provider
  • Enterprise SLA-backed Oracle deployments
  • Features: 24/7 support, monitoring, backup management**
  • https://www.instaclustr.com/

Severalnines (ClusterControl)

  • Database automation and management platform
  • Self-hosted + managed options for Oracle
  • Features: Backup automation, scaling, monitoring, cluster management**
  • https://severalnines.com/

Infrastructure-as-a-Service Providers

DigitalOcean

  • Droplets (VPS) suitable for Oracle Database installation
  • Features: SSD storage, monitoring, automated backups, global data centers**
  • Popular with startups and developers for cost-effective Oracle hosting
  • https://www.digitalocean.com/

Linode (by Akamai)

  • High-performance cloud compute instances
  • Features: NVMe SSD storage, 40 Gbps network, 24/7 support**
  • Developer-friendly pricing and Oracle-compatible infrastructure
  • https://www.linode.com/

Vultr

  • Global cloud infrastructure provider
  • Features: High-frequency compute, block storage, private networking**
  • Optimized for database workloads with fast NVMe storage
  • https://www.vultr.com/

Hetzner

  • European cloud and dedicated server provider
  • Features: Cost-effective pricing, powerful hardware, excellent network**
  • Popular in Europe for Oracle Database hosting
  • https://www.hetzner.com/

OVHcloud

  • European cloud provider with global presence
  • Features: Bare metal servers, private cloud, hybrid solutions**
  • GDPR-compliant Oracle hosting solutions
  • https://www.ovhcloud.com/

Specialized Oracle Hosting Providers

CloudClusters

  • Oracle Database-as-a-Service on dedicated instances
  • Features: Automated backups, SSL security, scaling, monitoring**
  • Affordable pricing for small to medium Oracle workloads
  • https://www.cloudclusters.io/

A2 Hosting

  • Performance-optimized web and database hosting
  • Features: Turbo servers, SSD storage, 24/7 support**
  • Suitable for Oracle Database on VPS and dedicated servers
  • https://www.a2hosting.com/

Kamatera

  • Global cloud infrastructure platform
  • Features: Custom server configurations, pay-as-you-go pricing**
  • Flexible Oracle Database deployments across global data centers
  • https://www.kamatera.com/

Contabo

  • High-performance VPS and dedicated server provider
  • Features: Large RAM configurations ideal for Oracle, DDoS protection**
  • Cost-effective Oracle hosting with excellent price-to-performance ratio
  • https://www.contabo.com/