Use Navicat to connect to oracle database encountered problems and solutions

Use Navicat to connect to oracle database encountered problems and solutions

After installing oracle on the server, the company asked to study data migration. I was not comfortable looking at the command line. I just wanted to connect to the Oracle on the server with Navicat on my computer. As a result, I encountered some problems. Now record it for easy reference. , Also for your reference.

1.ORA-12541:TNS :no listener

Solution: turn on monitoring: lsnrctl start (stop/status) - turn on, turn off, view status

( Reminder: When you use sqlplus / as sysdba to enter the oracle database, you will be prompted to enter the user name and password, which may be because you did not switch to the oracle user )

2.ORA-12514:TNS:listener does not currently know of service requested in connect descriptor

1. Check your tnsnames.ora file (place it in your oracle installation directory, for example, mine is /ora/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora , if you really don’t want to call it, Use find / -name tnsnames.ora can also be found) and whether the service name can correspond

2. Check whether the database instance is started select status from v$instance

I am reporting an error here

If successful, success will be displayed

The above figure reports ORA-01034 error, showing that oracle is not available, that is, the instance is not started

, Can be opened through the following steps.

(1)sqlplus /nolog

(2)conn / as sysdba

(3) startup

Re-test after opening, select status from v$instance , the display is turned on, Navicat will test the connection again, and it will be successful.

3.ORA-03135: connection lost contact

According to experience, since I connect to Oracle remotely, I need the firewall to open port 1521 on the server. I think it may be that the firewall port is not opened. Check the open ports of the firewall ( iptables -L -n )

I performed the following steps to open the port

(1) Edit the iptables file: vim /etc/sysconfig/iptables

(2) Add open port configuration

(3) Restart the firewall: systemctl restart iptables

(4) Check the port opening situation again

 

(Two options, one is open, I just wrote about the result conflict or why)

4.ORA-28547:connection to server failed, probable Oracle Net admin error

Or when you open Navicat to connect to oracle, it displays "oracle library is not loaded" , which can be solved by the following methods:

(1)https://www.oracle.com/database/technologies/instant-client/downloads.html

(2) Download the version corresponding to your oracle, if I am a 64bit version, download the x64 version 

(3) There may be many versions after entering, the one I downloaded is 18.5.0.0.0, this does not matter much, just register an account if you need to log in

(4) Unzip after downloading

(5) Change the path of oci according to the picture 

(6) Successfully connected

Guess you like

Origin blog.csdn.net/orzMrXu/article/details/113248116