среда, 25 февраля 2009 г.

Listener

Настройка листенера для не кластерных конфигураций

По умолчанию сетевая служба Oracle Listener должна использовать порт 1521.

Файл sqlnet.ora должен содержать:


NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.EXPIRE_TIME = 10
ADR_BASE = /u01/app/oracle

Файл listener.ora должен содержать:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = .domain)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = DB_UNIQUE_NAME)
      (ORACLE_HOME   = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME = SID)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = DB_UNIQUE_NAME_DGMGRL)
      (ORACLE_HOME   = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME = SID)
    )
  )

#################################
# standard parameters
#################################
ADR_BASE_LISTENER = /u01/app/oracle
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON
VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET

#################################
# extended parameters
#################################
TRACE_LEVEL_LISTENER       = OFF
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER   = 120
INBOUND_CONNECT_TIMEOUT_LISTENER = 120
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF

#################################
# 1453883.1 CVE-2012-1675
#################################
SECURE_REGISTER_LISTENER = (TCP,IPC)


Настройка листенера для кластерных конфигураций

Файл listener.ora – по умолчанию никакие изменения не вносятся. Вносятся только параметры для устранения уязвимостей , ошибок и работы сервиса Data Guard Broker.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = DB_UNIQUE_NAME)           # для создания Standby БД
      (ORACLE_HOME   = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME      = SID)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = DB_UNIQUE_NAME_DGMGRL)    #для операций Switchover
      (ORACLE_HOME   = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME      = SID)
    )
  )
 




Настройка технологических дескрипторов соединения с БД для сервиса DGMGRL

Для Primary + Standby серверов добавить следующее описание дескрипторов:


vi $ORACLE_HOME/network/admin/tnsnames.ora

DB_UNIQUE_NAME_1 =
  (DESCRIPTION =
    (ENABLE=BROKEN)
    (ADDRESS_LIST=
        (ADDRESS = (PROTOCOL = TCP)(HOST = <имя_хоста_1>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DB_UNIQUE_NAME_1)
    )
  )

DB_UNIQUE_NAME_2 =
  (DESCRIPTION =
    (ENABLE=BROKEN)
    (ADDRESS_LIST=
        (ADDRESS = (PROTOCOL = TCP)(HOST = <имя_хоста_2>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DB_UNIQUE_NAME_2)
    )
  )

  

Пример конфигурации листенера:


oracle@omega:$  more listener.ora

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = omega.domain)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = TESTDB_OMEGA)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME = testdb)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = TESTDB_OMEGA_DGMGRL)
      (ORACLE_HOME   = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME = testdb)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = TESTDB)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2)
      (SID_NAME = testdb)
    )
  )


#################################
# standard parameters
#################################
ADR_BASE_LISTENER = /u01/app/oracle
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON
VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET

#################################
# extended parameters
#################################
TRACE_LEVEL_LISTENER       = OFF
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER   = 120
INBOUND_CONNECT_TIMEOUT_LISTENER = 120
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF

#################################
# 1453883.1 CVE-2012-1675
#################################
SECURE_REGISTER_LISTENER = (TCP,IPC)


oracle@omega:$



oracle@omega:$  more sqlnet.ora

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.EXPIRE_TIME = 10
ADR_BASE = /u01/app/oracle


oracle@omega:$  more tnsnames.ora

TESTDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = testdb)
    )
  )

RCAT =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = alpha)(PORT = 1521)))
      (CONNECT_DATA = (SID = RCAT)
    )
  )

oracle@omega:$ 







Настройка дескрипторов соединений на клиентской стороне

Подключение к тестовым БД 

Non-RAC конфигурация

<имя_дескриптора> =
  (DESCRIPTION =
    (ENABLE=BROKEN)
    (ADDRESS_LIST=
        (ADDRESS = (PROTOCOL = TCP)(HOST = <имя_хоста>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <имя_сервиса>)
    )
  )


RAC конфигурация

<имя_дескриптора> =
  (DESCRIPTION =
     (ENABLE=BROKEN)
     (CONNECT_TIMEOUT=30)
     (TRANSPORT_CONNECT_TIMEOUT=10)
     (RETRY_COUNT=3)
     (ADDRESS_LIST=
       (LOAD_BALANCE=on)
       (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
     )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <имя_сервиса>)
    )
  )

 

Подключение к боевым БД

Non-RAC конфигурация

<имя_дескриптора> =
  (DESCRIPTION =
    (ENABLE=BROKEN)
    (TRANSPORT_CONNECT_TIMEOUT=10)
    (ADDRESS_LIST=
      (LOAD_BALANCE=OFF)
      (FAILOVER=ON)
        (ADDRESS = (PROTOCOL = TCP)(HOST = <имя_хоста_1>)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = <имя_хоста_2>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <имя_сервиса>)
    )
  )

RAC конфигурация

<имя_дескриптора> =
  (DESCRIPTION_LIST=
     (LOAD_BALANCE=OFF)
     (FAILOVER=ON)
       (DESCRIPTION=
          (ENABLE=BROKEN)
          (CONNECT_TIMEOUT=30)
          (TRANSPORT_CONNECT_TIMEOUT=10)
          (RETRY_COUNT=3)
          (ADDRESS_LIST=
            (LOAD_BALANCE=ON)
            (ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))
          )
            (CONNECT_DATA=
              (SERVER = DEDICATED)
              (SERVICE_NAME=<имя_сервиса>)
            )
       )
       (DESCRIPTION=
          (ENABLE=BROKEN)
          (CONNECT_TIMEOUT=30)
          (TRANSPORT_CONNECT_TIMEOUT=10)
          (RETRY_COUNT=3)
          (ADDRESS_LIST=
            (LOAD_BALANCE=ON)
            (ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))
          )
            (CONNECT_DATA=
              (SERVER = DEDICATED)
              (SERVICE_NAME=<имя_сервиса>)
            )
       )
  )







Комментариев нет:

Отправить комментарий