the simplest sample of listener.ora and tnsnames.ora
2013-04-28 13:51
417 查看
for listener.ora file
LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = ocm.localdomain)(PORT = 1521))
SID_LIST_LISTENER =(SID_DESC= (SID_NAME = clone)(ORACLE_HOME = /u01/oracle/product/database))
that's all
if the listener has muti address , then add address_list , and address is just one of the entry
below is the normal type of an listener in admin/samples folder.
# LISTENER =
# (ADDRESS_LIST=
# (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
# (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
# SID_LIST_<lsnr>
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
# SID_LIST_LISTENER=
# (SID_LIST=
# (SID_DESC=
# #BEQUEATH CONFIG
# (GLOBAL_DBNAME=salesdb.mycompany)
# (SID_NAME=sid1)
# (ORACLE_HOME=/private/app/oracle/product/8.0.3)
# #PRESPAWN CONFIG
# (PRESPAWN_MAX=20)
# (PRESPAWN_LIST=
# (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
# )
# )
# )
for tnsnames.ora
ocm=(description=(address=(protocol=tcp)(port=1521)(host=ocm))
4000
(connect_data=(service_name=ocm))
(failover_mode=(type=select)(mode=basic)(retries=10)(delay=10)
)
for tnsnames.ora, key word description can't be omit and just like tns , key word address_list always can be omited. for fail_over see the text upper in red
a concludsion is that all the key words which contain "LIST" can be omited. DESCRIPTION_LIST , ADDRESS_LIST
LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = ocm.localdomain)(PORT = 1521))
SID_LIST_LISTENER =(SID_DESC= (SID_NAME = clone)(ORACLE_HOME = /u01/oracle/product/database))
that's all
if the listener has muti address , then add address_list , and address is just one of the entry
below is the normal type of an listener in admin/samples folder.
# LISTENER =
# (ADDRESS_LIST=
# (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
# (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
# SID_LIST_<lsnr>
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
# SID_LIST_LISTENER=
# (SID_LIST=
# (SID_DESC=
# #BEQUEATH CONFIG
# (GLOBAL_DBNAME=salesdb.mycompany)
# (SID_NAME=sid1)
# (ORACLE_HOME=/private/app/oracle/product/8.0.3)
# #PRESPAWN CONFIG
# (PRESPAWN_MAX=20)
# (PRESPAWN_LIST=
# (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
# )
# )
# )
for tnsnames.ora
ocm=(description=(address=(protocol=tcp)(port=1521)(host=ocm))
4000
(connect_data=(service_name=ocm))
(failover_mode=(type=select)(mode=basic)(retries=10)(delay=10)
)
for tnsnames.ora, key word description can't be omit and just like tns , key word address_list always can be omited. for fail_over see the text upper in red
a concludsion is that all the key words which contain "LIST" can be omited. DESCRIPTION_LIST , ADDRESS_LIST
FAILOVER_MODE Subparameter | Description |
---|---|
BACKUP | Specify a different net service name for backup connections. A backup should be specified when using preconnectto pre-establish connections. |
TYPE | Specify the type of failover. Three types of Oracle Net failover functionality are available by default to Oracle Call Interface (OCI) applications:session: Set to failover the session. If a user's connection is lost, a new session is automatically created for the user on the backup. This type of failover does not attempt to recover selects. select: Set to enable users with open cursors to continue fetching on them after failure. However, this mode involves overhead on the client side in normal select operations. none: This is the default. No failover functionality is used. This can also be explicitly specified to prevent failover from happening. |
METHOD | Determines how fast failover occurs from the primary node to the backup node:basic: Set to establish connections at failover time. This option requires almost no work on the backup server until failover time. preconnect: Set to pre-established connections. This provides faster failover but requires that the backup instance be able to support all connections from every supported instance. |
RETRIES | Specify the number of times to attempt to connect after a failover. If DELAYis specified, RETRIESdefaults to five retry attempts. Note: If a callback function is registered, then this subparameter is ignored. |
DELAY | Specify the amount of time in seconds to wait between connect attempts. If RETRIESis specified, DELAYdefaults to one second. Note: If a callback function is registered, then this subparameter is ignored. |
相关文章推荐
- Oracle 11g R2 listener.ora&tnsnames.ora Sample
- TNSNAMES.ORA, LISTENER.ORA and SQLNET.ORA
- Oracle 11g R2 listener.ora&tnsnames.ora Sample
- TNSNAMES.ORA, LISTENER.ORA and SQLNET.ORA
- 字体格式The format of Oracle tnsnames.ora file
- Analysing the ASM code of a simple sample of C programming language at Linux Platform by GCC and GDB
- The sample of O_ASYNC and aio_read
- 著名的安装制作软件InnoSetup的源码及示例源码-The installation of a well-known software s source code and sample InnoSetup source
- 133.Your database is open and the LISTENER listener is running. The new DBA of the system stops the
- TNSNAMES.ORA, LISTENER.ORA and SQLNET.ORA
- ORA-600 [KFDAUDEALLOC2] AND INSTANCE CRASH EVEN WITH THE FIX OF BUG 14467061 (文档 ID 1903273.1)
- The format of Oracle tnsnames.ora file
- InterOperability, O-TTPF and Other Highlights of The Open Group Conference
- java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:lis
- 《The Story of My Life》Introductiom - The Life and Work of Helen Keller
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclas
- ORA-12514, TNS:listener does not currently know of service requested in connect descriptor案例2
- Creating, Updating, and Deleting Documents(Chapter 3 of MongoDB The Definitive Guild)
- Oracle: listener.ora 、sqlnet.ora 、tnsnames.ora的配置及例子
- eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method