1.问题现象
[root@asm01 ~]# su - grid
[grid@asm01 ~]$ asmcmd
Connected to an idle instance.
ASMCMD>
2.使用命令查看
[root@asm01 ~]# ps -ef | grep -i asm
grid 1926 1 0 08:41 ? 00:00:00 asm_pmon_+ASM
grid 1928 1 0 08:41 ? 00:00:00 asm_clmn_+ASM
grid 1930 1 0 08:41 ? 00:00:00 asm_psp0_+ASM
grid 1934 1 0 08:42 ? 00:00:07 asm_vktm_+ASM
grid 1938 1 0 08:42 ? 00:00:00 asm_gen0_+ASM
grid 1940 1 0 08:42 ? 00:00:00 asm_mman_+ASM
grid 1944 1 0 08:42 ? 00:00:00 asm_gen1_+ASM
grid 1947 1 0 08:42 ? 00:00:00 asm_diag_+ASM
grid 1949 1 0 08:42 ? 00:00:00 asm_pman_+ASM
grid 1951 1 0 08:42 ? 00:00:00 asm_dia0_+ASM
grid 1953 1 0 08:42 ? 00:00:00 asm_dbw0_+ASM
grid 1955 1 0 08:42 ? 00:00:00 asm_lgwr_+ASM
grid 1957 1 0 08:42 ? 00:00:00 asm_ckpt_+ASM
grid 1959 1 0 08:42 ? 00:00:00 asm_smon_+ASM
grid 1961 1 0 08:42 ? 00:00:00 asm_lreg_+ASM
grid 1963 1 0 08:42 ? 00:00:00 asm_pxmn_+ASM
grid 1965 1 0 08:42 ? 00:00:00 asm_rbal_+ASM
grid 1967 1 0 08:42 ? 00:00:00 asm_gmon_+ASM
grid 1969 1 0 08:42 ? 00:00:00 asm_mmon_+ASM
grid 1971 1 0 08:42 ? 00:00:00 asm_mmnl_+ASM
grid 2073 1 0 08:42 ? 00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 2680 2653 0 08:58 pts/1 00:00:00 /u01/app/19.3.0/grid/perl/bin/perl -w -I /u01/app/19.3.0/grid/perl/lib/5.28.1 -I /u01/app/19.3.0/grid/perl/lib/site_perl/5.28.1 -I /u01/app/19.3.0/grid/lib -I /u01/app/19.3.0/grid/lib/asmcmd -I /u01/app/19.3.0/grid/rdbms/lib/asmcmd /u01/app/19.3.0/grid/bin/asmcmdcore
grid 2757 1 0 08:59 ? 00:00:00 oracle+ASM_user2546_testdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 2768 1 0 09:00 ? 00:00:00 asm_m000_+ASM
root 2796 2771 0 09:00 pts/2 00:00:00 grep --color=auto -i asm
[root@asm01 ~]# cat /home/grid/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.3.0/grid
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:.
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
umask 022
export PATH
3.判断为grid环境变量写错相关
[grid@asm01 ~]$ cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.3.0/grid
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:.
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
umask 022
export PATH
4.执行命令再次查看
[grid@asm01 ~]$ . ~/.bash_profile
[grid@asm01 ~]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 512 4096 4194304 20480 20112 5120 7496 0 N DATA/
版权声明:本文为博主原创文章,未经博主允许不得转载。
Linux,oracle