ASMCMD Command-Line Utility
Utility to Interact with or Manage Oracle ASM
Linux like Commands
No need of Complicated SQL Commands
Connects Using SYSASM or SYSDBA Privileges
Runs in Interactive Mode or Non-Interactive Mode
Important Commands
=================
showversion
showpatches
showclustermode
showclusterstate
dsget
lsdg
lsdsk
lsod
iostat
spget
lsct
pwd
ls
cd
du
find
lsof
lsattr
echo $ORACLE_SID = +ASM1
which asmcmd
asmcmd help
asmcmd -V
asmcmd -v
asmcmd -p
The environment variables ORACLE_HOME and ORACLE_SID determine the instance to which the program connects, and ASMCMD establishes a bequeath connection to it, in the same manner as a SQLPLUS / AS SYSASM. The user must be a member of the OSASM group.
If Flex ASM is enabled, the ASMCMD connects to any one of the ASM instances running in the cluster. The connection to ASM instance does not depend on the environment variables ORACLE_HOME and ORACLE_SID. The ASMCMD alert log shows to which instance ASMCMD is connected to. If the user wants to connect to a specific ASM instance, --INST option should be used to specify the instance name.
Specifying the -V option prints the asmcmd version number and exists immediately.
Specifying the --nocp option disables connection pooling feature for ASMCMD.
Specifying the -v option prints extra information that can help advanced users diagnose problems.
Specify the --privilege option to choose the type of connection. There are only two possibilities: connecting as SYSASM or as SYSDBA.
The default value if this option is unspecified is SYSASM.
Specifying the -p option allows the current directory to be displayed in the command prompt, like so:
ASMCMD [+DGNAME/FOLDER/FILE.ORA] >
Specifying the --discover option uses discovery string obtained from Listener, does not use ORACLE_SID.
asmcmd -V
asmcmd
ASMCMD>
help
help showversion
showversion
showversion --releasepatch --softwarepatch
showpatches
showclustermode (is for flex or non-flex)
showclusterstate (3 mdoes, normal, in rolling patch, in rolling upgrade)
lsdg (list diskgroups) (v$asm_diskgroup_stat)
lsdg --discovery (v$asm_diskgroup)
lsdg DATA
lsdg DATA -g (gv$asm_diskgroup_stat)
lsdg STRONG -g
lsdg STRONG -g --discovery
dsget (asm disk discover string)
lsdsk (asm disks) list disks (v$asm_disk_stat)
https://www.youtube.com/watch?v=AcmMuZMpOvU&list=PL7kWCcQSFwpY6i6cBYkMWlqVxQ4rXnmIN&index=5
24min
very useful block we are very much thankful
ReplyDelete