The warning is provided in 2 cases. If the ORACLE_SID is not set properly or when the ASM instance is not running.
Before Oracle 11g the user received an error which was indicated that the environment was wrong. In Oracle 11g a must beter message is provide, and there are situations where you can use ASMCMD even when the ASM instance is not started or the ORACLE_SID is not set properly.
So depending on the situation the message can be correct. If this is not wanted, validate if the ASM instance is running and/or ORACLE_SID is set correctly.
When using ASMCMD, if ASM instance is running, v$ views are used to retrieve the information requested. If the ASM instance is down, the diskheader is read to provide the requested information when using ASMCMD.
#asmcmd -p
Asmcmd lets you view directory structuture and files stored inside Oracle ASM usitlizing a CLI and unix like commands.
| Command |
Description |
| cd |
Changes the current directory to the specified directory. |
| du |
Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively. |
| exit |
Exits ASMCMD. |
| find |
Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory. |
| help |
Displays the syntax and description of ASMCMD commands. |
| ls |
Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups. |
| lsct |
Lists information about current ASM clients. |
| lsdg |
Lists all disk groups and their attributes. |
| mkalias |
Creates an alias for a system-generated filename. |
| mkdir |
Creates ASM directories. |
| pwd |
Displays the path of the current ASM directory. |
| rm |
Deletes the specified ASM files or directories. |
| rmalias |
Deletes the specified alias, retaining the file that the alias points to. |
Wildcard
The wildcard characters “*” and “%” match zero or more characters anywhere within an absolute or relative path. The two characters behave identically. The ASMCMD commands that accept wildcards are ls, du, rm, and find. The following examples illustrate the use of wildcards.