« I 服了 You,北京 | Blog首页 | Oracle 10g Release 2 all available »
Oracle 10g Release 2 new tools:asmcmd
作者:eygle | 【转载请注出处】|【云和恩墨 领先的zData数据库一体机 | zCloud PaaS云管平台 | SQM SQL审核平台 | ZDBM 数据库备份一体机】
链接:https://www.eygle.com/archives/2005/09/oracle_10g_rele.html
为了简化加强asm管理,OracleR2推出了一个新的命令行工具:asmcmd.链接:https://www.eygle.com/archives/2005/09/oracle_10g_rele.html
让我们简单来看一下这个工具的用法。
1.登录
需要首先设置ORACLE_SID为ASM实例:
[oracle@danaly ~]$ export ORACLE_SID=+ASM [oracle@danaly ~]$ asmcmd ASMCMD> |
2.第一版asmcmd提供的功能
ASMCMD> help asmcmd [-p] [command] The environment variables ORACLE_HOME and ORACLE_SID determine the instance to which the program connects, and ASMCMD establishes a bequeath connection to it, in the same manner as a SQLPLUS / AS SYSDBA. The user must be a member of the SYSDBA group. Specifying the -p option allows the current directory to be displayed in the command prompt, like so: ASMCMD [+DATAFILE/ORCL/CONTROLFILE] > [command] specifies one of the following commands, along with its parameters. Type "help [command]" to get help on a specific ASMCMD command. commands: -------- cd du find help ls lsct lsdg mkalias mkdir pwd rm rmalias |
3.同常用的Unix/Linux命令类似
cd,pwd,ls,find等命令,可以帮助用户来检索asm管理下的文件:
ASMCMD> pwd + ASMCMD> ls ORADG/ ASMCMD> ls -l State Type Rebal Unbal Name MOUNTED EXTERN N N ORADG/ ASMCMD> cd ORADG ASMCMD> ls DANALY/ ASMCMD> cd DANALY ASMCMD> ls -l Type Redund Striped Time Sys Name Y CONTROLFILE/ Y DATAFILE/ Y ONLINELOG/ Y PARAMETERFILE/ Y TEMPFILE/ N spfiledanaly.ora => +ORADG/DANALY/PARAMETERFILE/ \ spfile.269.600019515 ASMCMD> ls -l DATAFILE/ Type Redund Striped Time Sys Name DATAFILE UNPROT COARSE SEP 01 18:00:00 Y SYSAUX.266.600016977 DATAFILE UNPROT COARSE SEP 01 18:00:00 Y SYSTEM.264.600016955 DATAFILE UNPROT COARSE SEP 01 18:00:00 Y UNDOTBS1.265.600016969 DATAFILE UNPROT COARSE SEP 01 18:00:00 Y USERS.268.600016987 |
4.可以在asmcmd中创建删除目录,删除文件等
5.lsct查看当前asm客户端
6.lsdg查看当前磁盘组的状态
总的看来,asmcmd只是带来了管理上的一些方便之处,本质上没有带来新的东西。但是可以猜测,有了这个命令行接口之后,Oracle将逐渐增加它的新功能。相信很快通过asmcmd来和操作系统交互,来备份拷贝文件将会成为可能。
历史上的今天...
>> 2015-09-01文章:
>> 2011-09-01文章:
>> 2009-09-01文章:
>> 2007-09-01文章:
>> 2006-09-01文章:
ASMCMD> mkdir test ASMCMD> ls -l test ASMCMD> ls CONTROLFILE/ DATAFILE/ ONLINELOG/ PARAMETERFILE/ TEMPFILE/ spfiledanaly.ora test/ ASMCMD> rm test/ ASMCMD> ls CONTROLFILE/ DATAFILE/ ONLINELOG/ PARAMETERFILE/ TEMPFILE/ spfiledanaly.ora |
5.lsct查看当前asm客户端
ASMCMD> lsct DB_Name Status Software_Version Compatible_version Instance_Name danaly CONNECTED 10.2.0.1.0 10.2.0.1.0 danaly |
6.lsdg查看当前磁盘组的状态
ASMCMD> lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN N N 512 4096 1048576 69459 68060 0 68060 0 ORADG/ |
总的看来,asmcmd只是带来了管理上的一些方便之处,本质上没有带来新的东西。但是可以猜测,有了这个命令行接口之后,Oracle将逐渐增加它的新功能。相信很快通过asmcmd来和操作系统交互,来备份拷贝文件将会成为可能。
历史上的今天...
>> 2015-09-01文章:
>> 2011-09-01文章:
>> 2009-09-01文章:
>> 2007-09-01文章:
>> 2006-09-01文章:
By eygle on 2005-09-01 21:45 | Comments (0) | FAQ | 413 |