ASMCMD-8102: no connection to Oracle ASM
通过ASMCMD命令连接ASM,Connected to an idle instance
[root@shdb02 ~]# su - oracle
[oracle@shdb02 ~]$ asmcmd
Connected to an idle instance.
ASMCMD> cd +DATA
//输入命令显示没有连接到 oracle asm
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
ASMCMD> pwd
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run ASMCMD> help
commands:
-------- md_backup, md_restore lsattr, setattr cd, cp, du, find, help, ls, lsct, lsdg, lsof, mkalias
mkdir, pwd, rm, rmalias chdg, chkdg, dropdg, iostat, lsdsk, lsod, mkdg, mount
offline, online, rebal, remap, umount dsget, dsset, lsop, shutdown, spbackup, spcopy, spget
spmove, spset, startup chtmpl, lstmpl, mktmpl, rmtmpl chgrp, chmod, chown, groups, grpmod, lsgrp, lspwusr, lsusr
mkgrp, mkusr, orapwusr, passwd, rmgrp, rmusr volcreate, voldelete, voldisable, volenable, volinfo
volresize, volset, volstat ASMCMD> exit
[oracle@shfpdb02 dbs]$ exit
logout
//换到grid用户
[root@shdb02 ~]# su - grid
[grid@shdb02 ~]$ asmcmd
ASMCMD> cd /
ASMCMD> ll
commands:
-------- md_backup, md_restore lsattr, setattr cd, cp, du, find, help, ls, lsct, lsdg, lsof, mkalias
mkdir, pwd, rm, rmalias chdg, chkdg, dropdg, iostat, lsdsk, lsod, mkdg, mount
offline, online, rebal, remap, umount dsget, dsset, lsop, shutdown, spbackup, spcopy, spget
spmove, spset, startup chtmpl, lstmpl, mktmpl, rmtmpl chgrp, chmod, chown, groups, grpmod, lsgrp, lspwusr, lsusr
mkgrp, mkusr, orapwusr, passwd, rmgrp, rmusr volcreate, voldelete, voldisable, volenable, volinfo
volresize, volset, volstat ASMCMD> ls
ARCH/
DATA/
FRA/
OCR/
查看系统一些环境信息
[oracle@shdb02 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
[oracle@shfpdb02 ~]$ env | grep ORA
ORACLE_PATH=.:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/home/oracle/bin:/u01/app/oracle/product/11.2.0/db_1/bin:/u01/app/oracle/product/11.2.0/db_1/OPatch:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/u01/app/oracle/common/oracle/bin:/u01/app/oracle/common/oracle/sql:.:/u01/app/oracle/product/11.2.0/db_1/rdbms/admin
ORACLE_SID=ht2
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
查看asm的相关信息
[root@shdb02 ~]# su - grid
[grid@shdb02 ~]$ export ORACLE_SID=+ASM2
[grid@shdb02 ~]$ sqlplus / as sysdba
SQL> set linesize 200
SQL> col path for a30
SQL> select name,path,state,group_number from v$asm_disk; NAME PATH STATE GROUP_NUMBER
------------------------------ ------------------------------ -------- ------------
/dev/asm-disky NORMAL 0
/dev/asm-diskz NORMAL 0
/dev/asm-diskx NORMAL 0
/dev/asm-diskw NORMAL 0
/dev/asm-diskv NORMAL 0
/dev/asm-disku NORMAL 0
/dev/asm-diskt NORMAL 0
/dev/asm-disks NORMAL 0
DATA_0003 /dev/asm-diskad NORMAL 2
DATA_0002 /dev/asm-diskac NORMAL 2
ARCH_0004 /dev/asm-diski NORMAL 1 NAME PATH STATE GROUP_NUMBER
------------------------------ ------------------------------ -------- ------------
ARCH_0003 /dev/asm-diskh NORMAL 1
DATA_0001 /dev/asm-diskab NORMAL 2
DATA_0000 /dev/asm-diskaa NORMAL 2
ARCH_0001 /dev/asm-diskf NORMAL 1
ARCH_0002 /dev/asm-diskg NORMAL 1
ARCH_0000 /dev/asm-diske NORMAL 1
OCR_0002 /dev/asm-diskd NORMAL 4
DATA_0006 /dev/asm-diskq NORMAL 2
DATA_0007 /dev/asm-diskr NORMAL 2
OCR_0001 /dev/asm-diskc NORMAL 4
DATA_0005 /dev/asm-diskp NORMAL 2 NAME PATH STATE GROUP_NUMBER
------------------------------ ------------------------------ -------- ------------
DATA_0004 /dev/asm-disko NORMAL 2
FRA_0003 /dev/asm-diskn NORMAL 3
FRA_0001 /dev/asm-diskl NORMAL 3
FRA_0002 /dev/asm-diskm NORMAL 3
FRA_0000 /dev/asm-diskk NORMAL 3
OCR_0000 /dev/asm-diskb NORMAL 4 28 rows selected. 如何知道rac使用的是pfile or spfile
SQL> show parameter pfile NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +OCR/shdb-cluster/asmparamet
erfile/registry.253.975783623 SQL> show parameter spfile NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +OCR/shdb-cluster/asmparamet
erfile/registry.253.975783623 asm日志
[grid@shdb02 ~]$ cat /u01/app/oracle/product/11.2.0/db_1/log/diag/asmcmd/user_oracle/shdb02/alert/alert.log
29-Oct-20 18:03 Connected to an idle instance.
29-Oct-20 18:03 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
29-Oct-20 18:04 Connected to an idle instance.
29-Oct-20 18:04 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
29-Oct-20 18:09 Connected to an idle instance.
29-Oct-20 18:09 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
29-Oct-20 18:10 Connected to an idle instance.
29-Oct-20 18:10 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
08-Dec-21 11:36 Connected to an idle instance.
08-Dec-21 11:36 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
10-Dec-21 13:45 Connected to an idle instance.
10-Dec-21 13:45 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 12:04 Connected to an idle instance.
14-Mar-22 12:04 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 12:04 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 12:04 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 12:08 Connected to an idle instance.
14-Mar-22 12:08 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 13:40 Connected to an idle instance.
14-Mar-22 13:40 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
14-Mar-22 13:41 Connected to an idle instance.
14-Mar-22 13:41 ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run
[grid@shdb02 ~]$ echo $ORACLE_BASE
/u01/app/grid
[grid@shdb02 ~]$ echo $ORACLE_HOME
/u01/app/11.2.0/grid
查看asmcmd有三种方式
1、asmcmd命令行模式
ASMCMD>cd + //切换到ASM磁盘根路径
ASMCMD> pwd
+ //当前路径为根路径 +
//列出当前ASM客户端的信息
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group
+ASM CONNECTED 11.2.0.4.0 11.2.0.4.0 +ASM2 OCR
+ASM CONNECTED 11.2.0.4.0 11.2.0.4.0 +ASM2 DATA
fp CONNECTED 11.2.0.4.0 11.2.0.4.0 fp2 DATA
ht CONNECTED 11.2.0.4.0 11.2.0.4.0 ht2 DATA
ht CONNECTED 11.2.0.4.0 11.2.0.4.0 ht2 FRA
//列出所有磁盘组及其属性
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 5242880 4969060 0 4969060 0 N ARCH/
MOUNTED EXTERN N 512 4096 1048576 8388608 4291161 0 4291161 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 4194304 4148235 0 4148235 0 N FRA/
MOUNTED NORMAL N 512 4096 1048576 30720 29794 10240 9777 0 Y OCR/
////列出数据文件信息
ASMCMD> lsof
DB_Name Instance_Name Path
+ASM +ASM2 +ocr.255.4294967295
fp fp2 +data/fp/controlfile/current.267.1006784839
fp fp2 +data/fp/datafile/epssite.dbf
fp fp2 +data/fp/datafile/example.14574.1006784845
fp fp2 +data/fp/datafile/mall.14576.1007732257
fp fp2 +data/fp/datafile/shfp.14578.1007732255
fp fp2 +data/fp/datafile/shfppj.14579.1007731213
fp fp2 +data/fp/datafile/sysaux.264.1006784737
fp fp2 +data/fp/datafile/system.14577.1006784737
fp fp2 +data/fp/datafile/undotbs1.265.1006784737
fp fp2 +data/fp/datafile/undotbs2.14573.1006785011
fp fp2 +data/fp/datafile/users.266.1006784737
fp fp2 +data/fp/onlinelog/group_1.263.1006784841
fp fp2 +data/fp/onlinelog/group_2.262.1006784841
fp fp2 +data/fp/onlinelog/group_3.14572.1006785065
fp fp2 +data/fp/onlinelog/group_4.261.1006785065
fp fp2 +data/fp/tempfile/temp.14575.1006784845
ht ht2 +data/htstandby/controlfile/current.256.975847439
ht ht2 +data/htstandby/datafile/epssite.271.975888699 //列出盘的信息
ASMCMD> lsdsk
Path
/dev/asm-diskaa
/dev/asm-diskab
/dev/asm-diskac
/dev/asm-diskad
/dev/asm-diskb
/dev/asm-diskc
/dev/asm-diskd
/dev/asm-diske
/dev/asm-diskf
/dev/asm-diskg
/dev/asm-diskh
/dev/asm-diski
/dev/asm-diskk
/dev/asm-diskl
/dev/asm-diskm
/dev/asm-diskn
/dev/asm-disko
/dev/asm-diskp
/dev/asm-diskq
/dev/asm-diskr
2、不进入asmcmd下,直接执行asmcmd命令方式
不进入ASM命令模式下操作,如:
//查看ASM磁盘占用情况
[grid@shdb02 ~]$ asmcmd ls -ls
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 5242880 4969060 0 4969060 0 N ARCH/
MOUNTED EXTERN N 512 4096 1048576 8388608 4291161 0 4291161 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 4194304 4148235 0 4148235 0 N FRA/
MOUNTED NORMAL N 512 4096 1048576 30720 29794 10240 9777 0 Y OCR/
3、在ASM 实例模式下
//在命令提示符中,设置oracle_sid环境变量为+ASM实例
[grid@shdb02 ~]$ export ORACLE_SID=+ASM2
//在Oracle11g RAC 中以grid用户登入后 , 以sysdba登入也是可以查看asm实例相关的状态, 但是不能做变更, sysasm 角色连接后才可以。
[grid@shdb02 ~]$ sqlplus / as sysasm ##或 sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 14 14:13:52 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> set linesize 200
SQL> col path for a30
SQL> select name,path,state from v$asm_disk;
NAME PATH STATE
------------------------------ ------------------------------ --------
/dev/asm-disky NORMAL
/dev/asm-diskz NORMAL
/dev/asm-diskx NORMAL
/dev/asm-diskw NORMAL
/dev/asm-diskv NORMAL
/dev/asm-disku NORMAL
/dev/asm-diskt NORMAL
/dev/asm-disks NORMAL
DATA_0003 /dev/asm-diskad NORMAL
DATA_0002 /dev/asm-diskac NORMAL
ARCH_0004 /dev/asm-diski NORMAL NAME PATH STATE
------------------------------ ------------------------------ --------
ARCH_0003 /dev/asm-diskh NORMAL
DATA_0001 /dev/asm-diskab NORMAL
DATA_0000 /dev/asm-diskaa NORMAL
ARCH_0001 /dev/asm-diskf NORMAL
ARCH_0002 /dev/asm-diskg NORMAL
ARCH_0000 /dev/asm-diske NORMAL
OCR_0002 /dev/asm-diskd NORMAL
DATA_0006 /dev/asm-diskq NORMAL
DATA_0007 /dev/asm-diskr NORMAL
OCR_0001 /dev/asm-diskc NORMAL
DATA_0005 /dev/asm-diskp NORMAL
NAME PATH STATE
------------------------------ ------------------------------ --------
DATA_0004 /dev/asm-disko NORMAL
FRA_0003 /dev/asm-diskn NORMAL
FRA_0001 /dev/asm-diskl NORMAL
FRA_0002 /dev/asm-diskm NORMAL
FRA_0000 /dev/asm-diskk NORMAL
OCR_0000 /dev/asm-diskb NORMAL
28 rows selected.
ASMCMD-8102: no connection to Oracle ASM的更多相关文章
- Oracle ASM 相关的 视图(V$) 和 数据字典(X$)
本文转自: http://blog.csdn.net/tianlesoftware/article/details/6733039 ASM由于其高度的封装性,使得我们很难知道窥探其内部的原理.可以通过 ...
- Oracle ASM 详解
ASM:Automatic Storage Management, 是Oracle 主推的一种面向Oracle的存储解决方案, ASM 和 RDBMS 非常相似,ASM 也是由实例和文件组成, 也可以 ...
- 【翻译自mos文章】使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法
使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法 參考原文: How to Copy asm files between remote ASM instances usi ...
- 【Oracle】Oracle ASM管理监控命令
目录 Oracle ASM管理监控命令 目的: 1.查看磁盘组 2.查看目前归档 3.查看ASM的磁盘路径 4. asmcmd Oracle ASM管理监控命令 目的: 查看目前Oracle ASM相 ...
- oracle asm 概念
automated storage management ,即自动存储管理,简称asm .. 在oracle 10g 这个版本之前,管理一个大型数据库成千上万的数据文件对数据库管理员来说是一个既无技术 ...
- Oracle ASM
一 Oracle ASM簡介 Oracle 10g推出的管理磁盤的新方式,用於取代LVM技術.主要用于RAC環境 二 Oracle ASM的配置安裝 1.安裝asm包 RedHat Linux5.x ...
- (转)设置了RemoveIPC=yes 的RHEL7.2 会crash掉Oracle asm 实例和Oracle database实例
设置了RemoveIPC=yes 的RHEL7.2 会crash掉Oracle asm 实例和Oracle database实例,该问题也会在使用Shared Memory Segment (SHM ...
- Oracle ASM 磁盘组基础知识整理(收藏版)
转至:https://cloud.tencent.com/developer/article/1494403 为什么要写这么一篇基础知识呢?还是有那么一点点原因的,不是胡编乱造还真是有真实存在的事件的 ...
- Linux CentOS6.5下安装Oracle ASM
Oracle版本:Oracle 11g 1.确定自己的Linux版本: [root@localhost ~]#uname -r 2.6.32-431.el6.x86_64 2.6.32-431.el6 ...
随机推荐
- 关于BFS
嗨,又是躺平的一天呢 下文有很多未经版权允许而私自转载,不喜勿喷 今天我来整理亿下关于 BFS 这个"高级"的东西: 首先,我不得不提亿句 关于队列 是个啥 队列(queue)是一 ...
- 使用数据库、Redis、ZK分别实现分布式锁!
分布式锁三种实现方式: 基于数据库实现分布式锁: 基于缓存(Redis等)实现分布式锁: 基于Zookeeper实现分布式锁: 基于数据库实现分布式锁 悲观锁 利用select - where - f ...
- 版本控制工具之git的常用命名01
基本命令 从git远程仓库导出项目:git clone http://127.0.0.1/name_master/server.git 从git远程仓库拉取代码:git pull 查看本地仓库状态:g ...
- xx局点FusionCloud6.3 type1 计算配额失败问题
现象: 排查过程: 1.登录云平台部署面,选择部署资源-服务器 2.找到MOC-ManageOne-Service01.MOC-ManageOne-Service02两台机器ip地址. 3.用ssh工 ...
- 知识点简单总结——minmax容斥
知识点简单总结--minmax容斥 minmax容斥 好像也有个叫法叫最值反演? 就是这样的一个柿子: \[max(S) = \sum\limits_{ T \subseteq S } min(T) ...
- CF1430F Realistic Gameplay (贪心+DP)
朴素做法暴力DP,O(nk)过不去... 1 #include <cmath> 2 #include <cstdio> 3 #include <cstring> 4 ...
- Spring Cache缓存框架
一.序言 Spring Cache是Spring体系下标准化缓存框架.Spring Cache有如下优势: 缓存品种多 支持缓存品种多,常见缓存Redis.EhCache.Caffeine均支持.它们 ...
- Java中的list和set有什么区别
list与set方法的区别有:list可以允许重复对象和插入多个null值,而set不允许:list容器是有序的,而set容器是无序的等等 Java中的集合共包含三大类,它们分别是Set(集),Lis ...
- CHAR 和 VARCHAR 的区别?
1.CHAR 和 VARCHAR 类型在存储和检索方面有所不同 2.CHAR 列长度固定为创建表时声明的长度,长度值范围是 1 到 255 当 CHAR 值被存储时,它们被用空格填充到特定长度,检索 ...
- 学习GlusterFS(七)
初始环境: 系统环境:centos73.10.0-514.26.2.el7.x86_64 机器数量:两台 硬盘:至少两块,一块为系统盘,另一块留作他用 命名规则:node1 node2 IP规划:19 ...