ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rman的常用命令和asm查看的命令

rman的常用命令和asm查看的命令

原创 Linux操作系统 作者:zhangshengdong 时间:2012-04-20 10:52:29 0 删除 编辑
自己使用命令的时候,老是记不住,这次总结下,以后好查找
 
ASM相关的
 
1.查看v$asm_diskgroup;
SQL> select group_number,name from v$asm_diskgroup;
GROUP_NUMBER NAME
------------ ----------
           1 ARCHDG
           2 DATADG
           3 GRIDDG
 
2.查看v$asm_disk
SQL> col name format a10;
SQL> col path format a20;
SQL> select path, name from v$asm_disk;
PATH                 NAME
-------------------- ----------
/dev/rdisk/disk120   DATADG_000
                     0
/dev/rdisk/disk121   DATADG_000
                     1
/dev/rdisk/disk122   DATADG_000
                     2
/dev/rdisk/disk123   DATADG_000
                     3
 
 
asm磁盘组的用户是gird
 
CBDBS02[/]su - grid
CBDBS02-> asmcmd
ASMCMD> ls
ARCHDG/
DATADG/
GRIDDG/
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        1024   4096  1048576    512000   181649                0          181649              0             N  ARCHDG/
MOUNTED  EXTERN  N        1024   4096  1048576   5632000  5550615                0         5550615              0             N  DATADG/
MOUNTED  EXTERN  N        1024   4096  1048576      5120     4692                0            4692              0             N  GRIDDG/
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
RMAN相关的
 
list backup of database(查看数据库的全库备份,全部细节都包括)
list backup of tablespace users (查看users表空间的备份)
list backup of datafile 5;(5是表空间对应的文件id)
list backup of controlfile(看出控制文信息的备份)
list backup of datafile '+DATADG/cboms/datafile/users.264.735423243';(根据具体的数据文件的具体位置,查看备份)
list expired backup;(无效的备份)
list expired archivelog all;(查看无效的archive log 日志)
 
list backup of database summary(这个是对概况性的,对数据库有个直观,全面的了解)
list backup of database summary 
list backup of archivelog all summary 
list backup of tablespace users summary 
list backup of datafile 5 summary
 

crosscheck archivelog all;验证DB的归档日志时候缺失

crosscheck backup;验证数据库备份集的是否缺失

delete expired archivelog all;命令删除所有过期的归档日志

 
 
 
 
 

 
 
 
 
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26446098/viewspace-721748/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Linux中的vsftpd
请登录后发表评论 登录
全部评论

注册时间:2011-11-18

  • 博文量
    25
  • 访问量
    73818