I am currently working on creating a database link to query data from an on-premises Oracle database. Although I have a working connection string, I don't have access to the server itself. When I attempt to query data from a table using the database link, I encounter the error ORA-28864. It appears this issue is due to the absence of the on-premises database wallet in my OCI environment. The question is: Is it possible to make it work event without the wallet?
First i tried to create it directly using
CREATE DATABASE LINK PRODATA
CONNECT TO user IDENTIFIED BY password
USING '(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port))
(CONNECT_DATA=
(SERVICE_NAME=service)
)';
This returned the error
ORA-013031: insufficient privileges
But I'm using the admin user, who theoretically has all the privileges.
Then I tried
BEGIN
DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK(
db_link_name => 'PRODATA',
hostname => host,
port => port,
service_name => service,
credential_name => 'PRODATA_CREDENTIALS',
ssl_server_cert_dn => NULL,
directory_name => NULL);
END;
/
It runs without any errors by when I query a table like
select usr_name from users@prodata;
It returns the error
ORA-28864: SSL connection closed gracefully