Plsql Remote Access Database address ora-12541: TNS: the best way to do without listeners, plsqlora-12541
It is strange that the ip address on the local LAN is not fixed. Now all the ip addresses are fixed, and this error is always reported. Baidu has no solution and is not feasible, or is there a problem with the method I opened ?????? I uninstalled the local oracle last night !!! The Virtual Machine is installed again, and the oracle is configured for the virtual machine.
I finally got it done. I ran it !!!!!!! Yes.
A connection Diagram
Plsql remote database access addressed ora-12541: TNS: no listeners
The local machine is a Windows 7 32-bit system. In order to learn oracle, A vbox virtual machine is installed, a Windows 7 virtual machine is installed, and oracle 11g is installed. (If Windows 7 is to be installed with 10g, You need to select the vista version, an error is reported when Windows is installed ). an error was reported after the oracle11g was installed. I didn't pay attention to it at the time. Now I forgot something wrong, but it does not affect the use. later, I wanted to install plsql on the local machine to remotely connect to oracle on Windows 7. the steps are as follows:
1. Download and install plsql.
2. Download the Instant Client, click Download, and download the first basic. After downloading and decompressing it, put it in the root directory of the main win7 d Drive, for example: d: \ instantclient_11_2
3. Create tnsnames. ora in d: \ instantclient_11_2 and edit it in notepad.
4. Find the oracle installation directory on Windows 7... \ App \ admin \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN \ tnsnames. ora, open it. For example, if the database instance is orcl, find the following code and copy it to the local machine d: \ instantclient_11_2 \ tnsnames. ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Virtual Machine IP) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
5. Add an environment variable named TNS_ADMIN with the value d: \ instantclient_11_2 \ tnsnames. ora in the path of the tnsnames. ora file. plsql finds the orcl connection string through this
6. Add an environment variable NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK.
7. Open PLSQL without logging in. Choose tool-preference-ORACLE-connection:
Check connection
Oracle main directory: d: \ instantclient_11_2
OCI Library: d: \ instantclient_11_2 \ oci. dll
After the above steps, restart PLSQL, the problem is coming, the error: ora-12541: TNS: No listener program. ping can work, and the listener on Windows 7 virtual server is also on. after unremitting efforts, the experiment finally solved the following problems:
1. Select Bridging for the Virtual Machine network, and set static IP addresses for IPV4 connections in the Virtual Machine network.
IP Address: 192.168.1.111 (111 can be changed to your own 1-255)
Subnet Mask: 255.255.255.0
Default limelight: 192.168.1.1
Preferred DNS server: 192.168.1.1
After modification, remember to ping 192.168.1.111 on the main win7 and continue.
2. Modify .. \ app \ admin \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN \ listener. ora
SID_NAME = CLRExtProc to SID_NAME = orcl is the Instance name
Change HOST = localhost to HOST = 192.168.1.111
3. Modify .. \ app \ admin \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN \ tnsnames. ora
Change HOST = localhost to HOST = 192.168.1.111.
SID = CLRExtProc to SID = orcl
Okay, restart oracle and listen. plsql on the main win7 can remotely connect to the database on the Virtual Machine. -- it is useless to restart the database.