tnsnames.oraの場所 Oracle

tnsnames.oraの場所

Linux

$ORACLE_HOME/network/admin/ 

Window

C:\app\<アカウント名>\product\11.2.0\client_1\network\admin

tnsnames.oraのtsn設定例

# This file contains the syntax information for

# the entries to be put in any tnsnames.ora file

# The entries in this file are need based.

# The following is the general syntax for any entry in

# a tnsnames.ora file. There could be several such entries

# tailored to the user's needs.

# -- 開発環境 ------------------------------------------------------------------

# 開発環境ロードバランサ任せ

AAADB =

  (DESCRIPTION =

   (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.x)(PORT = xxxx))

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.x)(PORT = xxxx))

    (FAILOVER = ON)

    (LOAD_BALANCE = ON)

   )

   (CONNECT_DATA =

    (SERVICE_NAME = aaadb)

    (SERVER=DEDICATED)

   )

  )

# 開発環境1ノード優先

AAADB1 =

  (DESCRIPTION =

   (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.x)(PORT = xxxx))

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.x)(PORT = xxxx))

    (FAILOVER = ON)

    (LOAD_BALANCE = OFF)

   )

   (CONNECT_DATA =

    (SERVICE_NAME = aaadb)

    (SERVER=DEDICATED)

   )

  )

# 開発環境2ノード優先

AAADB2 =

  (DESCRIPTION =

   (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.x)(PORT = xxxx))

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.20.xx.x)(PORT = xxxx))

    (FAILOVER = ON)

    (LOAD_BALANCE = OFF)

   )

   (CONNECT_DATA =

    (SERVICE_NAME = aaadb)

    (SERVER=DEDICATED)

   )

  )