Oracle 11g-Network Configuration
When we finish installing Oracle, we need a network connection, which of course requires two things: the server and the client. Through the configuration of the two we can achieve network connectivity. So, how do we usually access the database server? There are two main ways of doing this:
1. access via network "TCP/IP", then at least start oracleoradb11g_home1tnslistener and ORACLESERVICEORCL Services. "Monitoring is for this situation"
Example:sqlplus Scott/[email protected]
2. start the ORACLESERVICEORCL service at least through local access.
Examp:sqlplus Scott/scott
Client and server primary tasks: "such as"
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/2F/5B/wKiom1Of5TyQyS2oAAFitmOBmiI451.jpg "title=" Picture 1.jpg "width=" 505 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:505px;height:270px; "alt=" Wkiom1of5tyqys2oaafitmobmii451.jpg "/>
The client's network service name configuration information includes the server address, the listener port number, and the database SID , and establishes a connection to the server's listener. Configuration information is saved in a file named Tnsnames.ora
The contents of the file are as follows: ORCL is the service name
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/2F/5B/wKioL1Of5TWTmP0DAACrL-Om_BY533.jpg "title=" Picture 2.jpg "alt=" Wkiol1of5twtmp0daacrl-om_by533.jpg "/>
Note: The service name is the concatenated string, which can be used to access the remote database, the simple understanding is that the service name is an identity to the database, the service name can access the database.
Server configuration: Can be configured through the NETCA tool. Configure the host name of the remote database, network protocol with TCP/IP, configure the completion of the login mode (in the case of Service name test): Sqlplus username/[email protected] Test service is connected: tnsping Service Name
server-side listener configuration information includes listening protocols, addresses, and other related information. The configuration information is saved in a file named Listener.ora . A listener is automatically configured when the Server software is installed . The file section reads as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/2F/5B/wKioL1Of5USxlB3DAAGURWLkUYo650.jpg "title=" Picture 3.jpg "alt=" Wkiol1of5usxlb3daagurwlkuyo650.jpg "/>
Q server-Side monitoring control: Lsnrctl start|stop| status
Q graphical Interface Configuration monitoring: NETCA
Q Edit File Mode configuration listener: Listener.ora file
In oracle11g, the file for network configuration in addition to Listener.ora and Tnsnames.ora, there is a sqlnet.orl. Part of the document reads as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/2F/5B/wKiom1Of5YqRzxi4AAGxRTdhriU751.jpg "title=" Picture 4.jpg "alt=" Wkiom1of5yqrzxi4aagxrtdhriu751.jpg "/>
Do not know whether we have found that we can directly log into the database through the statement Sqlplus/as SYSDBA without the need to enter any password, this is not unsafe, but a mechanism of oracle. The NTS parameter indicates that we can do this, and if we change the NTS to none, we will find that we cannot log in to the database system. This is the first knowledge point of the file.
The second point of knowledge is the second sentence, Ezonnect is the meaning of simple connection, similar to: Conn Scott/[email protected] Computer name: 1521/ORCL is not required to do any configuration on the client.
As for the TNSNames is the local naming method, similar to the Conn Scott/[email protected] Connection method, the customer will need to configure a local name resolution file, is Tbsnames.ora, NETCA configuration can be used.
The above is the content of the Sqlnet.ora file.
Static and dynamic registration "static monitoring and dynamic monitoring"
Registration is to register the database as a service to the listener, and during the database server startup process, the database server registers the corresponding service with the listener.
in the Listener.ora , if there is a similar
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Global_dbname = ORCL)
(Oracle_home = D:\app\Administrator\product\11.1.0\db_1)
(Sid_name = ORCL)
)
)
, which is static registration
in the Listener.ora , if there is a similar
LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = a84p1l1x02meo8p) (PORT = 1521))
)
), which is dynamic registration.
One feature of dynamic registration is that it does not require listener. ORA file. Default
acknowledge the situation PMON  to LSNRCTL  register tcp/ip protocol ,PORT  1521   
use lsnrctl status to see if a service is statically registered, or a dynamic note
if it is UNKNOWN , which indicates a static registration; Ready , the table
Dynamic registration is shown.
Ready the service is provided by Pmon The process dynamically registers to the listener, so
Pmon The database in which the process resides must be open, so that these services
the corresponding instance of the name is ready. (Ready) accepts a connection request from a user.
UNKNOWN The service is done by editing Listener.ora while the statically registered service
Name, the listener does not know if the instance of the service name is open, so
with UNKNOWN representation.
Dynamic registration and static registration can be converted as needed.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/2F/5B/wKiom1Of5bjDG4lPAAECmL-9-Hc885.jpg "title=" Picture 5.jpg "alt=" Wkiom1of5bjdg4lpaaecml-9-hc885.jpg "/>
The last point is the configuration tool:
1. Configure the network connection using the NET configuration Assistant
interface operation, not easy to error, in fact, it is modified Listener.ora
and the Tnsnames.ora file.
2.NETCA in the naming method configuration, is actually modified
Sqlnet.ora content in a file
3. Configuring static registration with Net Manager
This article is from the "8898156" blog, please be sure to keep this source http://8908156.blog.51cto.com/8898156/1427279