sys_context('userenv', 'server_host')の値はどのOS情報を元にしていますか?
OS reahat7.2
Oracle 19.3
select sys_context('userenv', 'server_host') from dual;
上記のクエリを実行した結果、hostAとかえってきます。
hostnameコマンドを実行すると hostA.domainB とかえってきます。
select hostname from v$instanceを実行しても
hostA.domainB とかえってきます。
この違いは何が原因で起きているのでしょうか?
これを解消する方法はありますでしょうか?
hostnameコマンドを実行し、"hostA" とすれば一致することは分かっているのですが
OS情報を変更することに抵抗がある本番環境なのでそれ以外の方法があれば知りたいです。
select sys_context('userenv', 'server_host') from dual;
As a result of executing the above query, it will be returned as hostA.
When you execute the hostname command, it will return to hostA.domainB.
Even if you execute select hostname from v $ instance
It will be returned as hostA.domainB.
What is causing this difference?
Is there a way to get rid of this?
I know it matches if I run the hostname command and say "hostA"