sql - 是否可以判断调用了哪个 Oracle 集群节点?
问题描述
sysdate
根据节点,我得到不同的结果。但是如何确定哪些是有问题的节点?
解决方案
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.
推荐阅读
- java - LinkedHashMap:replace 方法无法替换指定键的值
- excel - 你可以“使用”一个带有列表框的宏吗?VBA Excel 用户表单
- powershell - 如何将参数沿管道传递给不接受管道输入的函数?
- swift - Frida 在完成处理程序中传递 __NSStackBlock__ 参数
- python-3.x - 为什么没有返回语句的函数可以修改用户定义的类实例中的属性,但不能修改内置类实例?
- debian - Debian xfce 在 alt + f4 上更改为虚拟控制台
- python - 为什么我更新 pip 时可以安装 Stellargraph?
- ansible - 尝试在 ansible playbook 中的组变量中使用嵌套变量。难以从组 vars 文件点步行到子 var
- javascript - 如何从 Chrome 错误页面获取请求的 url
- java - 使用 SMBJ 客户端将数据附加到现有文件