Oracle Connection String for RAC Environment?

前端 未结 1 727
独厮守ぢ
独厮守ぢ 2021-01-25 17:58

I have got an ORACLE RAC Environment access .The details are

Database Name: orcl Service Name: orcl IP Address: 192.168.1.1 and 192.168.1.2

SQL> host         


        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-25 18:53

    Your connection string is referencing one instance on one server/node. You should be using the common service name instead, and identifying all the servers it is available on.

    The equivalent for you would be something like this (line breaks just for clarity here):

    (DESCRIPTION=(ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.1)(PORT=1521))
        (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521))
    )(CONNECT_DATA=(SERVICE_NAME=orcl)))
    

    As long as it is resolvable, it shouldn't matter whether you use the DNS names or the IP addresses for the HOST parameters.

    You may also need the LOAD_BALANCE or FAILOVER parameters; see the docs.

    0 讨论(0)
提交回复
热议问题