首页 > 解决方案 > 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.

标签: oracleperformanceviewvinstance

解决方案


V$SESSION 中的一些列,例如机器、程序,在建立连接时由 Oracle 客户端填充。在过去的一个版本的客户端未能填充程序。因此,V$SESSION 中的一些会话在程序中有信息,而有些则没有,因为我们使用了多个版本的客户端软件。如果您有权访问 Oracle 支持,您会发现在 V$Session OSUSER、MACHINE 和 PROGRAM 字段中可能无法正确看到非 US7ASCII 字符。(文档 ID 759325.1)


推荐阅读