oracle - host_name in v$instance view
问题描述
What does Oracle use to populate the host_name field in v$instance view OR machine in v$session. Is it hostname shell command or /etc/hosts file or something else?
I need to get the fully qualified hostname for two standbys I use. Each is opened in different mode (one ADG). Using "select * from v$session where username='PUBLIC'", I can pick machine name. But in some primary servers, it is FDQHN and in some shortname.
If I know what Oracle uses to get the host name, I can ask Infra team to set it to FDQHN.
解决方案
V$SESSION 中的一些列,例如机器、程序,在建立连接时由 Oracle 客户端填充。在过去的一个版本的客户端未能填充程序。因此,V$SESSION 中的一些会话在程序中有信息,而有些则没有,因为我们使用了多个版本的客户端软件。如果您有权访问 Oracle 支持,您会发现在 V$Session OSUSER、MACHINE 和 PROGRAM 字段中可能无法正确看到非 US7ASCII 字符。(文档 ID 759325.1)
推荐阅读
- python - 为什么只读取网页中的前两行 html 表格?
- ssl - 为什么我无法在 python 和 SQL server 之间建立成功的 pyodbc 连接?
- java - 如何设置循环
- c# - 使用 parse 转换与转换它们之间有什么区别
- botframework - 我的 CDN 托管图像的英雄卡图像渲染损坏
- java - AWS EC2 Linux 客户端代码未与 Windows Java 上的服务器连接
- java - Spring Kafka - offsetsForTimes 方法为某些分区返回 null
- c# - 创建一个空变量,我可以根据 if 语句中的不同存储过程填充
- facebook - 从手机号码中查找 Facebook 用户帐户 ID 或个人资料图片和用户名
- java - 如何在 Android 中按下按钮时播放随机声音?