Reputation: 197
I'm trying to connect to Oracle Autonomous Database using EZ CONNECT string: user/password@host:port/service_name
I have configured the access from the IP addresses I need to connect and set mTLS as not required:
As a result, I can successfully connect to the database when I use the wallet downloaded from the console.
But if I try to connect to the DB using EZ CONNECT string, I get the following error:
sqlplus -l user/password@tcp://adb.us-sanjose-1.oraclecloud.com:1521/service_name_high.adb.oraclecloud.com
SQL*Plus: Release 19.0.0.0.0 - Production on Wed May 25 00:19:38 2022
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
Is it possible to connect to Autonomous Database using EZ CONNECT string? If yes, then what am I doing wrong?
Update 1:
I also tried to use a full connect string
sqlplus -l user/pass@'(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-sanjose-1.oraclecloud.com))(connect_data=(service_name=xxxxxxx_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)(ssl_server_cert_dn="CN=adb.us-sanjose-1.oraclecloud.com, OU=Oracle ADB SANJOSE, O=Oracle Corporation, L=Redwood City, ST=California, C=US")))'
but then the connection fails with the following error ORA-28759: failure to open file.
I suspect that it's some security settings, but I can clearly see that my IP is enabled and since with the same security settings I can connect with mutual TLS and wallet, I don't understand where the problem might be.
Upvotes: 3
Views: 1616
Reputation: 96
You can configure Autonomous to allow connection without a WALLET:
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/support-tls-mtls-authentication.html
(Which looks like you done that)
However you still need TCPS and not TCP: https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/connect-jdbc-thin-tls.html - and you need to pass the security part, which cannot be passed today in the short format (see connecting without a wallet).
PS: Autonomous Dedicated (ADB-D) allows connecting with pure TCP.
Upvotes: 1