The hierarchical nature of objects maintained by
the ASM instance lends itself to a command set similar to what you would use to browse and
maintain files in a Linux file system.
Before you can use asmcmd, you must ensure that the environment variables ORACLE_BASE,
ORACLE_HOME, and ORACLE_SID are set to point to the ASM instance; for the ASM instance
used in this chapter, these variables are set as follows:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=+ASM
FIGURE 4-23 EM Database Control ASM disk group statistics
Chapter 4: Physical Database Layouts and Storage Management 117
In addition, you must be logged into the operating system as a user in the dba group, since
the asmcmd utility connects to the database with SYSDBA privileges. The operating system user
is usually oracle but can be any other user in the dba group.
You can use asmcmd one command at a time by using the format asmcmd command, or
you can start asmcmd interactively by typing just asmcmd at the Linux shell prompt. To get a
list of available commands, use help from the ASMCMD> prompt, and help command at
the ASMCMD> prompt for more details. Table 4-7 lists the asmcmd commands and a brief
description of their purpose; the asmcmd commands available only in Oracle Database 11g
are noted in the last column.
When you start asmcmd, you start out at the root node of the ASM instance??™s file system;
unlike in a Linux file system, the root node is designated by a plus sign (+) instead of a leading
forward slash (/), although subsequent directory levels use a forward slash.
Pages:
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221