首页 行业资讯 宠物日常 宠物养护 宠物健康 宠物故事

linux下如何用命令来配置oracle11g的监听

发布网友 发布时间:2022-04-22 17:44

我来回答

1个回答

热心网友 时间:2022-04-10 13:27

这个不是命令配置的,是改文件

如果是服务端:

$ORACLE_HOME/network/ADMIN目录,修改LISTENER.ORA

到$ORACLE_HOME/bin下,通过lnsrctl start启动监听  lnsrctl stop | lnsrctl status 分别是停止监听和查看监听状态

如果是客户端:

    $ORACLE_HOME/network/ADMIN目录,修改tnsnames.ora

==========================================================

配置LISTENER.ORA的demo:

LISTENER =                                                                     
 (ADDRESS_LIST=                                                                
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))                          
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))                     
                                                                               
SID_LIST_LISTENER=                                                             
  (SID_LIST=                                                                   
(SID_DESC=                                                                   
        #BEQUEATH CONFIG                                                     
         (GLOBAL_DBNAME=salesdb.mycompany)                                     
         (SID_NAME=sid1)                                                         
         (ORACLE_HOME=/private/app/oracle/proct/8.0.3)                       
        #PRESPAWN CONFIG                                                     
        (PRESPAWN_MAX=20)                                                      
  (PRESPAWN_LIST=                                                            
          (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))               
        )                                                                      
       )                                                                       
      )                                                                        
配置tnsnames.ora的demo:

ora_xxx =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ora11g)    <-----这个地方填SID_NAME也行
    )
  )

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com