Datasheet
28
Chapter 1
Using Oracle ASM
You can start ASMCMD with the –p option and it will display the current directory
level, as shown in this example:
C:\oracle\product\11.1.0.6\DB01\BIN>asmcmd -p
ASMCMD [+] >
ASMCMD Commands
ASMCMD has a basic set of commands, many of which mimic Unix commands. You can
see these commands from the ASMCMD prompt if you type in
help. The commands are
pretty straightforward and easy to use. In the next section, we will introduce each com-
mand and provide an example of its use. Table 1.3 lists the different ASMCMD commands
and their purposes.
TABLE 1.3 ASMCMD Commands
Command Purpose Example
cd Changes ASM directory. cd +group1
du
Gets disk use. du
find
Finds directory or file. find + rob11g
help
Displays the help screen. help
ls
Lists files in directory. ls –l
lsct
Lists all clients using the ASM
instance.
lsct
lsdg
Lists information on disk groups in
the ASM instance.
lsdg
lsdsk
Lists ASM visible disks. Supported
only in Unix.
lsdsk -k -d DATA *
mkalias
Creates an ASM alias for a given
ASM filename.
mkalias +cooked_dgroup1/11gDB/
controlfile/Current.258
.613087119 +cooked_dgroup1/
control01.ctl
mkdir
Creates an ASM directory. mkdir old
md_backup
Backs up ASM metadata. md_backup –b /tmp/
dgbackup070222 -g dgroup1 -g
dgroup2
95134c01.indd 28 1/28/09 9:43:44 AM