Common Oracle ASM commands

Source: Internet
Author: User
In the OracleRAC environment, run asmcmd with the grid account to enter the asm command mode, such as: [grid @ oradb-node1 ~] $ AsmcmdASMCMDgt; ASMCMD

In the Oracle RAC environment, use the grid account to run asmcmd to enter the asm command mode, such as: [grid @ oradb-node1 ~] $ Asmcmd ASMCMDgt; ASMCMD

In the Oracle RAC environment, run

Run asmcmd to enter the asm command mode, for example:

[Grid @ oradb-node1 ~] $ Asmcmd

ASMCMD>

ASMCMD> du // display all disk space occupied by the ASM file in the specified ASM directory

ASMCMD> ls-ls // list the content, attributes, and disk space in the ASM directory.

ASMCMD> pwd // view the current path

ASMCMD> cd ../DATA // switch directory

ASMCMD> lsct // list information of the current ASM Client

ASMCMD> lsdg // list all disk groups and their attributes

ASMCMD> lsof // List Data File Information

ASMCMD> lsdsk // list disk Information

ASMCMD> rm-f *. dbf // delete all files with the. dbf extension.

ASMCMD> rm-fr orcldemo // Delete the current orcldemo directory

The root path of the ASM disk is "+" instead of "/". The following is a demonstration operation:

ASMCMD> cd datadg/demo

ASMCMD> pwd

+ Datadg/demo // The current path is + datadg/gd

ASMCMD> cd + // switch to the root path of the ASM Disk

ASMCMD> pwd

+ // The current path is the root path +

You can also choose not to enter the ASM command mode, such:

[Grid @ oradb-node1 ~] $ Asmcmd ls-ls // view the usage of the ASM Disk

To use the graphical interface, run the ASM assistant command: asmca.

[Grid @ oradb-node1 ~] $ Sqlplus/as sysasm

-- View disk group information

SQL> select name, state, type, total_mb, free_mb from v $ asm_diskgroup;

-- View disk Information

SQL> select group_number, path, state, total_mb, free_mb from v $ asm_disk;

-- View disk I/O information. datadg is the disk group name.

[Grid @ oradb-node1 ~] $ Asmcmd lsdsk -- statistics-G datadg

Or briefly display the read/write, including the ASM disk list.

[Grid @ oradb-node1 ~] $ Asmcmd iostat-G datadg

Add the ASM disk disk08_test to the ASM disk group datadg. the disk path is ORCL: DATA3_TEST.

(You must first create this disk name at the operating system level/etc/init. d/oracleasm createdisk DATA3_TEST/dev/mapper/mpathx)

SQL> alter diskgroup datadg add disk 'ORCL: DATA3_TEST 'name disk08_test;

Delete the ASM disk disk08_test from the ASM disk group datadg.

SQL> alter diskgroup datadg drop disk disk08_test;

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Oracle 11g from entry to proficient in PDF + CD source code

Installing Oracle 11g R2 using RHEL6 ASM

Oracle 10g manual creation of the ASM Database

Oracle 10g R2 create ASM instance Step By Step

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.