View the environment variables of a process in Oracle

Source: Internet
Author: User
View the value of the environment variable used by an Oracle process. When nls_lang is null, we want to know the default value. When installing the version, we want to know that a process is generated by the database of that version, we can use the following method to view the environment variable value of the ORACLE process. Because of various operating systems

View the value of the environment variable used by an Oracle process. When nls_lang is null, we want to know the default value. When installing the version, we want to know that a process is generated by the database of that version, we can use the following method to view the environment variable value of the ORACLE process. Because of various operating systems

View the value of the environment variable used by an Oracle process. When nls_lang is null, we want to know the default value. When installing the version, we want to know that a process is generated by the database of that version, we can use the following method to view the environment variable value of the ORACLE process.

Because different operating systems use different commands, only the commands under the solaris platform are tested here, and only the methods are written on other platforms.

Environment: solaris 10, Oracle 11gr2

1. view the process ID.

$ Ps-ef | grep ora
Oracle 4530 1 0 20:07:12? 0: 00 ora_reco_htzdg
Oracle 4548 1 0 20:07:18? 0: 02 ora_arc0_htzdg
Oracle 4575 1 0 20:07:22? 0: 04 ora_cjq0_htzdg
Oracle 12667 1 0 22:05:34? 0: 00 ora_w002_htzdg
2. view the process environment variables:
$ Pargs-e 12667
12667: ora_w002_htzdg
Envp [0]: SKGP_SPAWN_DIAG_PRE_EXEC_TS =
Envp [1]: SKGP_HIDDEN_ARGS =
Envp [2]: SKGP_SPAWN_DIAG_POST_FORK_TS =
Envp [3]: SKGP_SPAWN_DIAG_PRE_FORK_TS =
Envp [4]: Oracle_SPAWNED_PROCESS = 1
Envp [5]: XFILESEARCHPATH =/usr/dt/app-defaults/% L/Dt
Envp [6]: DISPLAY = 192.168.100.1: 0.0
Envp [7]: Oracle_BASE =/u01/app/oracle
Envp [8]: PWD =/u01/app/oracle/product/11.2.0/db_2/bin
Envp [9]: _ =./dbua
Envp [10]: SHELL_HOME =/home/Oracle/rs
Envp [11]: Oracle_SID = htzdg
Envp [12]: NLSPATH =/usr/dt/lib/nls/msg/% L/% N. cat
Envp [13]: MAIL =/usr/mail/Oracle
Envp [14]: TZ = PRC
Envp [15]: NLS_LANG = AMERICAN_AMERICA.AL32UTF8
Envp [16]: JAVA64FLAG =-d64
Envp [17]: HOME =/home/Oracle
Envp [18]: LD_LIBRARY_PATH =/u01/app/oracle/product/11.2.0/db_2/lib: /u01/app/oracle/product/11.2.0/db_2/jdk/jre/lib/amd64/server: /u01/app/oracle/product/11.2.0/db_2/jdk/jre/lib/amd64:/u01/app/oracle/product/11.2.0/db_2/jdk/jre /.. /lib/amd64:/u01/app/oracle/product/11.2.0/db_2/lib:/u01/app/oracle/product/11.2.0/db_2/network/lib:
Envp [19]: TERM = vt100
Envp [20]: SHELL =/bin/ksh
Envp [21]: LOGNAME = Oracle
Envp [22]: PATH =
Envp [23]: Oracle_HOME =/u01/app/oracle/product/11.2.0/db_2
Envp [24]: ORA_NET2_DESC = 10, 13
The default NLS_LANG and other values that use the default environment variables appear.

3. Other platforms

LINUX: cat/proc/ /Environ
AIX: ps eauwww

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.