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.

1 Answer

Several of the columns in V$SESSION such as machine, program are populated by the Oracle client when making a connection. In the past one version of the client failed to populate program. So some sessions in V$SESSION had information in the program and some did not since we had multiple versions of the client software in use. If you have access to Oracle support you can find this in Non US7ASCII characters may not be seen correctly in V$Session OSUSER, MACHINE and PROGRAM fields. (Doc ID 759325.1)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.