环境:
OS:Red Hat Linux As 5
DB:10.2.0.4
1.连接ASM实例
[oracle@rac1 ~]$ asmcmd
asmcmd: command disallowed by current instance type
[oracle@rac1 ~]$ export ORACLE_SID=+ASM1
[oracle@rac1 ~]$ 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.ASMCMD常用命令举例
ASMCMD> ls
DG1/
RECOVERYDEST/
ASMCMD> cd DG1
ASMCMD> pwd
+DG1
ASMCMD> ls
DEVDB/
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name
devdb CONNECTED 10.2.0.1.0 10.2.0.1.0 devdb1
devdb CONNECTED 10.2.0.1.0 10.2.0.1.0 devdb1
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED NORMAL N N 512 4096 1048576 8188 5494 0 2747 0 DG1/
MOUNTED EXTERN N N 512 4096 1048576 4094 3760 0 3760 0 RECOVERYDEST/
ASMCMD目前提供的命令是比较少的,功能也比较有限.
--The End--
阅读(932) | 评论(0) | 转发(0) |