Preparing to Run ASMCMD

You can run the ASMCMD utility in either interactive or noninteractive mode.

Before running ASMCMD, review the items in the following list.

  • Log in to the host which contains the Oracle ASM instance that you plan to administer.

    You must log in as a user that has SYSASM or SYSDBA privileges through operating system authentication. The SYSASM privilege is the required connection to administer the Oracle ASM instance. See "Authentication for Accessing Oracle ASM Instances".

    See Also:

    Refer to the Oracle Database Administrator's Guide for information about operating system authentication

  • To connect to the Oracle ASM instance, run ASMCMD that is located in the bin subdirectory of the Oracle Grid Infrastructure home (Oracle ASM home).

    Connect as SYSASM, the default connection, to administer an Oracle ASM instance.

    Ensure that the ORACLE_HOME and ORACLE_SID environment variables to refer to the Oracle ASM instance. Depending on your operating system, you might have to set other environment variables to properly connect to the Oracle ASM instance.

    Ensure that the bin subdirectory of your Oracle Grid Infrastructure home is in your PATH environment variable.

    See Also:

    Refer to the Oracle Database Administrator's Guide for more information about setting environment variables

    The default value of the Oracle ASM SID for a single-instance database is +ASM. In Oracle Real Application Clusters environments, the default value of the Oracle ASM SID on any node is +ASMnode#.

  • To use most of the ASMCMD commands, ensure that the Oracle ASM instance is started and the Oracle ASM disk groups are mounted.

    If the Oracle ASM instance is not running, ASMCMD runs only those commands that do not require an Oracle ASM instance. The commands include startup, shutdown, lsdsk, help, and exit. If you attempt to run other ASMCMD commands, an error message displays.

  • You can connect to the database instance as SYSDBA by running ASMCMD that is located in the bin directory of the Oracle Database home.

    Ensure that the ORACLE_HOME and ORACLE_SID environment variables to refer to the database instance. Depending on your operating system, you might have to set other environment variables to properly connect to the database instance.

    You must include the --privilege option to connect as SYSDBA. See "Specifying the Type of Connection".

    With this connection, there is a limited set of operations that can be run. For more information, see "The SYSDBA Privilege for Managing Oracle ASM Components".

    When administering disk groups, Oracle recommends that you run ASMCMD from the database home of the database instance that is the owner of the files in the disk group.