A
A
Akalit2022-03-17 15:05:13
Oracle
Akalit, 2022-03-17 15:05:13

How to connect to an Oracle database installed on a VM?

Good afternoon.
The Oracle 18c database is installed on the VM. I installed Oracle Instant Client + ODBC on the local PC. I
copied the files to a folder on the 'C' drive as instructed, set PATH, and I get an error in creating the user's DNS where the test connection button is. ORA - 12154. I think that this is due to the fact that I have not specified the ip of the virtual machine to which I need to connect anywhere. I found on the Internet that ip needs to be registered in the tnsnames.ora file, which I don’t have, maybe it needs to be created.
Tell me, at this stage, what other steps are needed to connect to the VM database?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Komarov, 2022-03-17
@Akalit

tnsnames.ora should be located in $ORACLE_HOME/network/admin. $ORACLE_HOME is the path to your instantclient installation. It is in this file that you specify the connection settings

%alias%=
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=%vm_ip%)(PORT=1521))
    (CONNECT_DATA=(SERVICE_NAME=%db-name%))
)

what other steps are needed to connect to the VM database

Check the ability to connect to the VM on port 1521 (permissions in the firewall, port forwarding (if necessary))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question