首页 > 解决方案 > 是否可以判断调用了哪个 Oracle 集群节点?

问题描述

sysdate根据节点,我得到不同的结果。但是如何确定哪些是有问题的节点?

标签: sqloracle

解决方案


Assuming you are able to connect via sqlplus or another tool and assuming you are using TNS names.....

If the assumptions above are correct your TNS names will look somthing like the below

(DESCRIPTION=
  (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))

You can then simply remove all nodes except 1 (backing up file first of course) then connect to via SQLPULS or your tool of choice and do..

select sysdate from dual;

Rinse and repeat for each of the nodes in the TNSNames original file, until you find which are the problematic nodes, although I am unsure of any reason that different nodes would give a different sysdate.


推荐阅读