Hi, hope this is the right place to post this as I think my mistake is happening in VBS, not SQLcl.
I'm using Visual Builder Studio (in OCI, latest version of everything including the Builder ver being 25.01.2, and SQLcl template being 24.3) to deploy apex schema changes.
The DEV and TEST databases I'm connecting between are both oracle autonomous databases of the ADW type.
I have an SQLcl build step, and when I connect as the ADMIN user, it connects just fine. However, it's obviously not a great practice to use ADMIN here and it's the DEV schema I want to target anyway (with lb generate-schema
). When I run the desired command it wants to capture the current schema (ADMIN schema) by default, even when I use alter session set current_schema=DEV;
, which works when deploying at the other end with lb update
but not here when capturing the schema to begin with.
However, when I change the login details to my DEV schema user, keeping the connection string and wallet location as it was (exampleadb_medium, walletgit/Wallet_ExampleADB.zip), I suddenly get this error:
[2025-02-03 02:11:59] Error report -
[2025-02-03 02:11:59] Connection Failed
[2025-02-03 02:11:59] Connection failed
[2025-02-03 02:11:59] USER = DEV
[2025-02-03 02:11:59] URL = jdbc:oracle:thin:@#$@exampleadb_medium
[2025-02-03 02:11:59] Error Message = ORA-12263: Failed to access tnsnames.ora in the directory configured as TNS admin: /home/builder. The file does not exist, or is not accessible.
[2025-02-03 02:11:59] https://docs.oracle.com/error-help/db/ora-12263/
I checked the linked doc to no avail.
I don't understand why changing the username/password in the SQLcl build step would suddenly prevent the wallet/connection string from forming properly. I've also tried putting the contents of exampleadb_medium in there directly but it still just tags it on after the @#$@
part. I don't see anything in tnsnames.ora that would make it specific to the ADMIN user.
If anyone can offer insights as to why it changes I'd greatly appreciate it.
For format reference, the (anonymized) connection string in tnsnames.ora:
exampleadb_medium = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=[correct hostname]))(connect_data=(service_name=[correct service name]))(security=(ssl_server_dn_match=no)))
Edit to add (24/02/25): The target ADB is configured as a private endpoint, accessed normally via a Load Balancer in OCI. The VBS instance is set up on the same subnet as the ADB. Could that be causing issues with tnsnames.ora or jdbc_thin?