ASMCMD
Instance wise Diskgroup Details:
lsdg -g
Databases using ASM Diskgroup:
lsct
Attributes of the Diskgroups:
lsattr -g DATA01
lsattr -g DATA01 -l
lsattr -g DATA01 -l
List the users from the local Oracle ASM password file.
lspwusr
Sample output:
ASMCMD [+] > lspwusr
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
ASMSNMP TRUE FALSE FALSE
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
ASMSNMP TRUE FALSE FALSE
Copy an Oracle ASM or database instance password file to the specified location:
pwcopy
Example:
ASMCMD [+] > pwcopy –asm +DATA01/orapwasm +FRA01/orapwasm_new
copying +DATA01/orapwasm -> +FRA01/orapwasm_new
copying +DATA01/orapwasm -> +FRA01/orapwasm_new
Copy file from ASM diskroup to OS Filesystem and vice versa:
asmcmd>
cp /tmp/test.dbf +DATA01/DATAFILE/test.dbf
cp +DATA01/DATAFILE/test.dbf /tmp/test.dbf
Adding DISK:
list disks attached to the diskgroup:
lsdsk -G TESTDG -k
sqlplus “/as sysasm”
sql>
alter diskgroup TESTDG ADD DISK ‘ORCL:TESTDISK3’
exit
Rename ASM Diskgroup (renamedg ):
create tablespace TESTTBS add datafile ‘+TESTDG’ SIZE 1G;
sql>
alter tablespace TESTTBS offline;
asmcmd>
umount TESTDG
exit
$/u01/data/oracle/product/11.2.0/grid/bin/renamedg dgname=TESTDG newdgname=TESTDATA01
sqlplus “/as sysdba
alter database rename file ‘+TESTDG/DATAFILE/test01.dbf’ to ‘+TESTDATA01/DATATAFILE/test01.dbf’;
No comments:
Post a Comment