Friday, June 22, 2007

ASM : Command Line Utility

Introduction : Here we will see how to Instance ASM Command Line Utility and its features

Pre-Requisite :

Download a Copy of ASM Command Line Utility for ASM Release 10.1

Installation Steps:
[root@in asm_command]# ls -lrt
total 48
-rw-r--r-- 1 root root 48359 Mar 31 09:33 asmcmd_10.2.0.1.0.zip
[root@in asm_command]# unzip asmcmd_10.2.0.1.0.zip
Archive: asmcmd_10.2.0.1.0.zip
inflating: README
inflating: asmcmd
inflating: asmcmd.bat
inflating: asmcmdcore
[root@in asm_command]# ls -lrt
total 276
-r-xr-x--- 1 root root 3099 Aug 11 2005 asmcmd
-r--r----- 1 root root 214856 Aug 11 2005 asmcmdcore
-r-xr-x--- 1 root root 1728 Aug 11 2005 asmcmd.bat
-rw-r--r-- 1 root root 1231 Aug 11 2005 README
-rw-r--r-- 1 root root 48359 Mar 31 09:33 asmcmd_10.2.0.1.0.zip
[root@in asm_command]#


Usage Steps:
ora10g$ export ORACLE_SID=+ASM
ora10g$ asmcmd
ASMCMD>


Commands:

1. Command to List all the Files and Directories

ASMCMD> ls
ARCH/
CONTROL/
DATA/
ASMCMD>
ASMCMD> ls -l
State Type Rebal Unbal Name
MOUNTED EXTERN N N ARCH/
MOUNTED NORMAL N N CONTROL/
MOUNTED NORMAL N N DATA/
ASMCMD>
ASMCMD> ls -lrt *
Type Redund Striped Time Sys Name

+ARCH/:
Y ODB/

+CONTROL/:
Y ODB/

+DATA/:
Y DB_UNKNOWN/
Y ODB/
ASMCMD>


2. Command to Change Directory

ASMCMD> cd +DATA

3. Command to List the Present Working Direcoty

ASMCMD> pwd
+DATA
ASMCMD>

Advanced Commands

ASMCMD> cd ODB
ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y DB_UNKNOWN/
Y ODB/
ASMCMD> cd ODB
ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y CONTROLFILE/
Y DATAFILE/
Y ONLINELOG/
Y TEMPFILE/
N spfileodb.ora => +DATA/DB_UNKNOWN/PARAMETERFILE/SPFILE.269.617745979
ASMCMD>

ASMCMD> ls *

+DATA/ODB/CONTROLFILE/:
Current.260.617411609
Current.261.617411607

+DATA/ODB/DATAFILE/:
SYSAUX.257.617411377
SYSTEM.256.617411373
T1.271.617752879
T1.272.618010569
T1.273.618010785
UNDOTBS1.258.617411379
USERS.259.617411381
t.data_d-odb_i-2580585621_ts-t1_fno-5_0cidc5u7
t.data_d-odb_i-2580585621_ts-t1_fno-5_0didc651
t1_5_db_odb

+DATA/ODB/ONLINELOG/:
group_1.262.617411613
group_1.263.617411665
group_2.264.617411719
group_2.265.617411773
group_3.266.617411845
group_3.267.617411929

+DATA/ODB/TEMPFILE/:
TEMP.268.617412065
spfileodb.ora
ASMCMD>

Summary : We have Installed ASM Command Line Utility

Popular Posts