1 oracle oinstall 219 10 April 17:01 sqlnet.ora 2 oracle oinstall 64 10 April 15:32 samples rw-r-r- 1 oracle oinstall 547 10 August 16:00 listener.oraĭrwxr-xr-x. Switch to oracle user on oracle 02 virtual admin]$ cd admin]$ ll ORACLE describes the connection information through the connection descriptor in the tnsnames.ora file. (GLOBAL_HOME = orcl)//Service name for external display (ADDRESS = (PROTOCOL = TCP)(HOST = oracle01)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) # Generated by Oracle configuration tools. # listener.ora Network Configuration File: /opt/app/oracle/product/11.2.0/db_1/network/admin/listener.ora rw-r- 1 oracle oinstall 504 10 August 16:24 tnsnames.ora//tns protocol connection important admin]$ vim listener.ora //Modify the configuration as follows 1 oracle oinstall 219 9 July 21-17:55 sqlnet.ora 1 oracle oinstall 187 5 July 2007 shrept.lst 2 oracle oinstall 64 9 July 21-17:47 samples rw-r-r- 1 oracle oinstall 553 10 August 16:18 listener.ora//Listening profileĭrwxr-xr-x.
Specific explanations can be seen: Change dynamic registration to static registration root]$ cd admin]$ ll //View all files in the current folder This information will be used for fallback and load balancing of connection requests. In this way, the listener always knows the status of the database whether it is running or closed. Whenever the database is closed, the dynamically registered database will dynamically log out of the listener, and the related information will disappear from the status list. The dynamically registered database is indicated by the status READY or status BLOCKED (for a standby database) in the status information. It checks whether the instance exists only when the client sends a connection request. At this time, the listener is used to indicate that it does not know any information about the instance. When the instance status is UNKNOWN, it indicates that the service is statically registered. The service name may or may not be the same as the instance name. It only needs to know the service name provided by the database to apply for connection to the database. The client does not need to know the database name and instance name.
Registration is to register the database as a service to the listener. Switch the virtual machine, and do the same Dynamic registration and static registration
Successful indicates that the monitoring is running normally (the code shown by the author is the listening status of static registration, and how to change dynamic registration to static registration will be explained later) Instance "orcl", status READY, has 1 handler(s) for this service.
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listener Log File /opt/app/oracle/diag/tnslsnr/oracle01/listener/alert/log.xml Listener Parameter File /opt/app/oracle/product/11.2.0/db_1/network/admin/listener.ora Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production All rights reserved.Ĭonnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) ~]# su oracle / / change to oracle root]$ lsnrctl status //Check whether listening is started If you want to establish a connection between two databases, first, set the listening service of the server and the service request of the client. Switching virtual machines: ~]# vim /etc/hosts / / change as follows:
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Modify hosts file ~]# vim /etc/hosts / / change as follows:ġ27.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 In the remote connection virtual machine, you can replace XShell5 with MobaXterm (both can be connected remotely, and the author uses MobaXterm).
Switching virtual machines: ~]# yum install vim / / install vim Installation of two virtual machine devices vim: ~]# yum install vim / / install vim The author takes oracle01 as the server and oracle02 as the client as an example. The ip and host names of the two virtual machines established by the author are: Oracle installation tutorial address Oracle server client connection Configuration environmentĪccording to the above Linux environment installation address as well as Oracle installation tutorial address To install two virtual machines, build Oracle environment on the two virtual machines, and install Oracle database. Extraction code: kle7 Oracle11 Linux silent installation