Beruflich Dokumente
Kultur Dokumente
��
Oracle Tips
Search BC Oracle Sites Got Questions?
KEEP pool deprecated
Custom Search in 12c
Search
asmcmd tips 12c Poster Available!
Free AWR Report
Oracle Database Tips by Donald Burleson Analysis
Home BEWARE of 11gR2
E-mail Us Upgrade Gotchas!
Oracle Articles
New Oracle Articles
ASMCMD is a command line utility for managing files and directories in ASM
(Automatic Storage Management ) diskgroups. It offers Unix-style filesystem
commands for managing ASM directories and files. Prior to Oracle 10gR2, ASM
Oracle Training had to be administered via OEM or SQL statements while connected to a special
Oracle Tips ASM instance.
Oracle Forum
Class Catalog
Note that ASMCMD cannot be used to create or drop diskgroups, or to add or drop
disks in a disk group. These ASM administrative tasks must be accomplished via
SQL commands.
Remote DBA ASMCMD offers two modes of operation: interactive and non-interactive.
Oracle Tuning Interactive mode provides a shell-like environment for executing ASMCMD
Emergency 911 commands. It resembles how SQL*Plus interactive mode works and looks like this:
RAC Support
Apps Support C:\Temp>asmcmd
Analysis
ASMCMD>
Design
Whereas non-interactive mode works much like the srvctl and lsnsctl XE "lsnsctl"
Implementation
commands, that is that one provides the base ASMCMD command, its command
Oracle Support
and any command parameters and all on the operating system command line, like
this:
SQL Tuning
C:\Temp>asmcmd ls -1
Security
The ASMCMD commands and their parameters are very Unix-like in nature, so
Oracle UNIX
they will look quite familiar to those on UNIX.
Oracle Linux
Monitoring
Remote support
Remote plans COMMAND DESCRIPTION
Remote services cd Change directory
Application Server cp Copy file
Applications du Disk space used by a directory and its subdirectories
Oracle Forms exit Exit the utility
Oracle Portal find Locate the path for all occurrences of the specified filename
App Upgrades help Displays command assistance
SQL Server ls List the contents of a directory
Oracle Concepts lsct List info about ASM clients
Software Support lsdg List all disk groups and their attributes
Remote Support lsdsk List all physical disks visible to ASM
Development md_backup Create a backup of the mounted diskgroups
Implementation md_restore Restore the diskgroups from a backup
mkalias Create an alias for a system generated filename
mkdir Create directory
pwd Print working directory (i.e. list current directory location)
Consulting Staff
http://www.dba-oracle.com/t_asmcmd.htm 1/6
8/3/2017 asmcmd tips
Consulting Prices remap Repair a range of blocks on a disk
Help Wanted! rm Remove (i.e. delete) the specified files or directories
rmalias Remove (i.e. delete) the specified alias
Oracle Posters
Oracle Books
Oracle Scripts
Ion When making the decision to bypass the JFS buffers with raw devices, the problem
Excel-DB has always been the management of the "raw" disk files, which are read directly by
Oracle, into Oracle data buffers, bypassing the OS overhead. For details on using
Don Burleson Blog ASM, I recommend the book "Oracle RAC and Grid" by Madhu Tumma and Mile
Ault.
The 10g release 2 has introduced an ASM command line utility dibbed "asmcmd"
to act as a DMCL (device media control language), to manage the interface between
the ASM logical data view and the physical disk files.
The asmcmd interface is launched by first setting the environment for +ASM, then
calling it with the asmcmd command. The idea of this tool is to make administering
the ASM files similar to administering standard operating system files.
Invoking asmcmd
The asmcmd utility is located in $ORACLE_HOME/bin/asmcmd and it should
already be pathed into your UNIX/Linux environment. We start asmcmd by setting
$ORACLE_SID to the ASM instance with +ASM, and we can them execute
asmcmd. You can use the "?" or "help" command to display all asmcmd
commands:
root> export ORACLE_SID=+ASM
root> asmcmd
ASMCMD> help
You can run the list data groups (lsdg) ASM command from a bash shell script to
quickly see the disk space usage:
#!/bin/bash
. /home/oracle/set_oraenv
sid="+ASM1"
echo "Check Space on "$sid
export ORACLE_SID=$sid
asmcmd << EOF
lsdg
EOF
http://www.dba-oracle.com/t_asmcmd.htm 2/6
8/3/2017 asmcmd tips
For a list of common Linux commands for Oracle, see the Oracle Linux command
poster or Jon Emmon's book "Oracle Shell Scripting".
http://www.dba-oracle.com/t_asmcmd.htm 3/6
8/3/2017 asmcmd tips
You can also use asmcmd to delete files using the standard rm command:
fred:/u01/app/oracle/admin>
http://www.dba-oracle.com/t_asmcmd.htm 4/6
8/3/2017 asmcmd tips
Note: This Oracle documentation was created as a support and Oracle training
reference for use by our DBA performance tuning consulting professionals. Feel
free to ask questions on our Oracle forum.
Burleson Consulting
http://www.dba-oracle.com/t_asmcmd.htm 5/6
8/3/2017 asmcmd tips
http://www.dba-oracle.com/t_asmcmd.htm 6/6