Oracle ASM管理监控命令

目的:

查看目前Oracle ASM相关的信息。

1.查看磁盘组

[root@newarpdb01 ~]# su - oracle
[oracle@newarpdb01 ~]$ sqlplus "/as sysdba"
SQL> select group_number,name,state,total_mb,free_mb from v$asm_diskgroup; GROUP_NUMBER NAME STATE TOTAL_MB FREE_MB
------------ ------------------------------ ----------- ---------- ----------
1 OCR MOUNTED 30720 29794
2 DATA CONNECTED 2097152 1935206

可以看到目前RAC数据库DATAOCRasm磁盘组。并且data磁盘组,总共是2TB左右。

2.查看目前归档

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DATA/archivelog
Oldest online log sequence 4695
Next log sequence to archive 4696
Current log sequence 4696

3.查看ASM的磁盘路径

SQL> col name format a10;
SQL> col path format a20;
SQL> col STATE format a20;
SQL> select path, name ,STATE,TOTAL_MB,FREE_MB from v$asm_disk; PATH NAME STATE TOTAL_MB FREE_MB
-------------------- ---------- -------------------- ---------- ----------
/dev/ocr1 OCR_0000 NORMAL 10240 9933
/dev/ocr2 OCR_0001 NORMAL 10240 9931
/dev/ocr3 OCR_0002 NORMAL 10240 9930
/dev/datadisk2 DATA_0001 NORMAL 1048576 967628
/dev/datadisk1 DATA_0000 NORMAL 1048576 967578
/dev/datadisk8 NORMAL 0 0
/dev/datadisk6 NORMAL 0 0
/dev/datadisk3 NORMAL 0 0
/dev/datadisk5 NORMAL 0 0
/dev/datadisk10 NORMAL 0 0
/dev/datadisk9 NORMAL 0 0 PATH NAME STATE TOTAL_MB FREE_MB
-------------------- ---------- -------------------- ---------- ----------
/dev/datadisk4 NORMAL 0 0
/dev/datadisk7 NORMAL 0 0 13 rows selected.

4. asmcmd

4.1 进入asmcmd

[root@newarpdb01 ~]# su - grid
[grid@newarpdb01 ~]$ asmcmd
ASMCMD> help ---可以看到asmcmd的帮助文档
asmcmd [-V] [-v <errors|warnings|normal|info|debug>] [--privilege <sysasm|sysdba>] [-p] [command]
asmcmd_no_conn_str Starts asmcmd (if no parameters) or executes the command with given parameters asmcmd [-V] [-v <errors|warnings|normal|info|debug>] [--privilege <sysasm|sysdba>] [-p] [command] Specify the connect string after the -c option to use the listener to
connect. By default, ASMCMD asks for a password in a non-echoing
prompt, unless the password is specified as part of the connect string. The connect identifier is in the form of "host:port:sid", with the
host and the port being option. Host defaults to "localhost" and port
to 1521. If the sid is not specified as a part of the connect
identifier, then it is read from the environment variable ORACLE_SID. If no connect string is used, then environment variables
ORACLE_HOME and ORACLE_SID determine the instance to which the program
connects, and asmcmd establishes a bequeath connection to the it, in
the same manner as a SQLPLUS / AS SYSASM. The user must be a member
of the SYSDBA group to exercise this option. Specifying the -V option prints the asmcmd version number and
exits immediately. Specifying the -v option prints extra information that can help
advanced users diagnose problems. Specify the --privilege option to choose the type of connection. There are
only two possibilities: connecting as SYSASM or as SYSDBA.
The default value if this option is unspecified is SYSASM: Specifying the -p option allows the current directory to be displayed
in the command prompt, like so: ASMCMD [+DATA/ORCL/CONTROLFILE] > The parameter command specifies one of the following commands, along
with its parameters. Type "help [command]" to get help on a specific ASMCMD command. commands:
-------- md_backup, md_restore analyze 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

4.2 lsdg 查看磁盘组信息

查看lsdg的帮忙命令

ASMCMD> help lsdg
lsdg Lists disk groups and their information. lsdg queries
V$ASM_DISKGROUP_STAT by default. If the --discovery flag is specified,
the V$ASM_DISKGROUP is queried instead. The output also includes
notification of any current rebalance operation for a disk group. If
a disk group is specified, then lsdg returns only information about
that disk group.

使用lsdg,查看asm磁盘组的详细信息,如磁盘大小,可用大小。

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 2097152 1935206 0 1935206 0 N DATA/
MOUNTED NORMAL N 512 4096 1048576 30720 29794 10240 9777 0 Y OCR/

其他命令,和linux的相关命令类似。可自我探索。

例如:在Oracle asm中找到归档日志的位置。如下:

[grid@newarpdb01 ~]$ asmcmd
ASMCMD> ls
DATA/
OCR/
ASMCMD> cd DATA
ASMCMD> ls
NEWARPDB/
archivelog/
ASMCMD> cd archivelog
ASMCMD> ls -l arch_5136_1002312928_0002.arc
Type Redund Striped Time Sys Name
N arch_5136_1002312928_0002.arc => +DATA/NEWARPDB/ARCHIVELOG/2019_11_26/thread_2_seq_5136.1628.1025345465

【Oracle】Oracle ASM管理监控命令的更多相关文章

  1. (转)Oracle RAC日常管理命令

    转自:http://www.xuebuyuan.com/1206937.html 一.查看RAC环境 RAC架构,2节点信息 节点1 SQL> show parameter instance N ...

  2. 转://Oracle 11gR2 ASM磁盘组管理

    一.环境.[grid@rhel2 ~]$ cat /etc/issueRed Hat Enterprise Linux Server release 5.5 (Tikanga) Kernel \r o ...

  3. oracle之二ASM 管理

    Oracle ASM 管理(PPT-II:602-636) 16.1 什么是ASM 自动存储管理即ASM(Automatic Storage Management),是Oracle提供的一项管理磁盘的 ...

  4. oracle PL/SQL管理命令语句

    一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl ...

  5. [置顶] Oracle 11g ASM:如何在 ASMCMD 命令行工具中创建 Oracle ACFS 文件系统

    实验环境:Oracle 11g R2 RAC (11.2.0.3.5)                Oracle Enterprise Linux 5.6 x86 1.创建 ASM 磁盘组 在两节点 ...

  6. Oracle管理监控之linux下wendba登录设置

    [root@localhost ~]# su - oracle [oracle@localhost ~]$ which jar/usr/bin/jar [oracle@localhost ~]$ ex ...

  7. 探索ORACLE之ASM概念(完整版)

    探索ORACLE之ASM概念(完整版) 本文出自https://www.jb51.net/article/43527.htm ASM是Oracle 10g R2中为了简化Oracle数据库的管理而推出 ...

  8. ORACLE之ASM概念

    一.     ASM(自动存储管理)的来由: ASM是Oracle 10g R2中为了简化Oracle数据库的管理而推出来的一项新功能,这是Oracle自己提供的卷管理器,主要用于替代操作系统所提供的 ...

  9. ORACLE之ASM学习

    ASM(Automatic Storage Management)是Oracle10g R2中为了简化Oracle数据库的管理而推出来的一项新功能,这是Oracle自己提供的卷管理器,主要用于替代操作 ...

随机推荐

  1. [洛谷P2425]小红帽的回文数

    原题传送门 这道题需要枚举.如果直接枚举会$TLE$. 考虑进制的转换:对于$> x$的进制下,一定是回文数 回文长度$2$位:设每一位为$i$,进制为$x$,则该数为$i*x+i$.反之,如果 ...

  2. The usage of Markdown---引用

    目录 1. 序言 2. 引用与嵌套引用 3. 列表中的引用 更新时间:209.09.14 1. 序言   在本篇,我们来仔细谈一下Markdown的引用. 2. 引用与嵌套引用   在Markdown ...

  3. Java 在PDF中添加页面跳转按钮

    在PDF 中可通过按钮来添加动作跳转到指定页面,包括跳转到文档首页.文档末页.跳转到上一页.下一页.或跳转到指定页面等.下面将通过java代码来演示如何添加具有以上几种功能的按钮. 使用工具: Fre ...

  4. Chrome插件开发(三)

    在日常工作中,我们可能经常需要在手机端测试我们所做的页面,如果每次在手机端测试都手输网址,网址短的还好,如果长的网址也需要一个字母一个字母去敲,那无疑是一场噩梦,试想我们有一个工具只需要点击一个按钮就 ...

  5. HTTP 304状态码的详细讲解

    首先,对于304状态码不应该认为是一种错误,而是对客户端有缓存情况下服务端的一种响应. 客户端在请求一个文件的时候,发现自己缓存的文件有 Last Modified ,那么在请求中会包含 If Mod ...

  6. 读书笔记——《MySQL DBA 工作笔记》

    关于前言 作者在前言中提出的一些观点很具有参考价值, 梳理完整的知识体系 这是每一个技术流都应该追逐的,完整的知识体系能够使我们对知识的掌握更加全面,而不仅仅局限于点 建立技术连接的思维,面对需求,永 ...

  7. Mybaits 源码解析 (十)----- 全网最详细,没有之一:Spring-Mybatis框架使用与源码解析

    在前面几篇文章中我们主要分析了Mybatis的单独使用,在实际在常规项目开发中,大部分都会使用mybatis与Spring结合起来使用,毕竟现在不用Spring开发的项目实在太少了.本篇文章便来介绍下 ...

  8. Jquery+CSS在不使用Checked的情况下实现当前选中行样式变化

    之前在做一个当前选中行样式变化时发现网上很多方法都是利用在行内添加checked,然后通过checked是否选中来判断当前选中行的位置,今天就整理了一个不需要在行内添加其他按钮直接通过变化当前选中行的 ...

  9. IntelliJ IDEA自动部署项目至远程服务器与传统部署项目至远程服务器的区别

    每次开发Java项目时,对于所有Java开发人员来说,最枯燥的不是修改代码,而是实时将自己的代码上传至远程服务器,进行测试或者部署,本人最初开发也是这样,通过使用Xshell 5,WinSCP等工具对 ...

  10. day4-字符串专区

    1.字符串 str (用''or“”表示) 字符串中每个组成部分为字符,python中只要是用引号引起来的都叫字符串 ---特征: 加法 n1 = "alex" n2 = &quo ...