In its most basic form, Oracle
uses three files (listener.ora, tnsnames.ora & sqlnet.ora) for network
configuration.
1. Listener.ora
The listerner.ora file contains
server side network configuration parameters. It can be found in the
"$ORACLE_HOME/network/admin" directory on the server.
Ex:-
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
dba_vm)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY =
EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CNTR)
(ORACLE_HOME =
/u01/app/oracle/product/11.2.0.2/db_1)
)
)
lsnrctl commands
1. Start a listener
If the listener has
not been started, start it with the command:
lsnrctl> start
listener_name
2. Check the status with the STATUS
command:
lsnrctl lsnrctl>
status listener_name
3. Check registered services
To see what database services is registered with a listener:
lsnrctl> services listener_name
4. Stop a listener
To stop a database listener:
lsnrctl> stop listener_name
5. Reload a listener
To reload a database listener (stop and restart without
disrupting the service):
lsnrctl> reload listener_name
2. tnsnames.ora
The "tnsnames.ora" file
contains client side network configuration parameters. It can be found in the
"$ORACLE_HOME/network/admin" directory on the client. This file will
also be present on the server if client style connections are used on the
server itself.
Ex:-
CNTR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
rac1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CNTR.US.DELOITTE.COM)
)
)
3. Sqlnet.ora
·
The "sqlnet.ora" file contains client
side network configuration parameters.
·
It can be found in the
"$ORACLE_HOME/network/admin" directory on the client.
·
This file will also be present on the server if
client style connections are used on the server itself.
Ex:-
NAMES.DIRECTORY_PATH=
(TNSNAMES, ONAMES, HOSTNAME)
NAMES.DEFAULT_DOMAIN
= WORLD
For the reason that the admin of this web page is working, no hesitation very rapidly it will be famous, due to its quality contents.
ReplyDeleteHeya i'm for the first time here. I found this board and I find It truly helpful & it helped me out much. I hope to offer something again and aid others like you helped me.
ReplyDelete