Oracle Rac Commands_v1

Share Embed Donate


Short Description

Oracle RAC Commands ASM Commands...

Description

Index 1.

Introduction ..................................................................................................................................................................2

2.

ASM Command library ................................................................................................................................................2

2.1.

ASM - Adding disk(s) to a diskgroup. ........................................................................................................................................... 2

2.2.

ASM - Vary disk(s) offline in a diskgroup ..................................................................................................................................... 2

2.3.

ASM - Dropping disk(s) from a diskgroup .................................................................................................................................... 2

2.4.

ASM - Rebalance disks after adding or dropping disk(s) ........................................................................................................... 2

2.5.

ASM - Mount all diskgroups ........................................................................................................................................................... 2

2.6.

ASM - Views ..................................................................................................................................................................................... 3

2.7.

ASM - debugging ASMCMD ........................................................................................................................................................... 3

3.

CRS Command library .................................................................................................................................................4

3.1.

CRS - Set debugging for SRVCTL commands in UNIX ............................................................................................................... 4

3.2.

CRS - NodeApps commands ......................................................................................................................................................... 4

3.3.

CRS - Re-assign Ip address on ethernet card .............................................................................................................................. 4

3.4.

CRS - Register / Unregister commands (DB - listener - Instance - ASM) .................................................................................. 4

3.5.

CRS - Start / Stop CRS Daemons - will also stop all dependent processes.............................................................................. 4

3.6.

CRS - Start / Stop registered listeners .......................................................................................................................................... 4

3.7.

CRS - Start / Stop ASM Instance.................................................................................................................................................... 5

3.8.

CRS - Start / Stop Database instance ............................................................................................................................................ 5

3.9.

CRS - Start / Stop Database ........................................................................................................................................................... 5

3.10.

CRS - check status of voting disks ............................................................................................................................................... 5

3.11.

CRS - SET, LIST and UNSET environment variables. .................................................................................................................. 5

4.

OCR Command library ................................................................................................................................................5

4.1.

OCR - show backups ...................................................................................................................................................................... 5

4.2.

OCR - Create manual backup......................................................................................................................................................... 5

4.3.

OCR - Dump contents of OCR disk to readable file ..................................................................................................................... 6

5.

Solutions - Solving listener with UNKNOWN status .................................................................................................6

RAC Commands_v1.1

Page 1 of 7

1.

Introduction

2.

ASM Command library

2.1.

ASM - Adding disk(s) to a diskgroup. Add a disk to an ASM diskgroup (Single disk or multiple disks). In DLL case reduncancy is managed at EMC level so we don’t need to specify a failgroup SQL> ALTER DISKGROUP DiskGroupName ADD DISK '/dev/DiskName' NAME LogicalDiskNameForASM ; sql> ALTER DISKGROUP DiskGroupName ADD DISK '/dev/DiskName1' NAME LogicalDiskNameForASM1 , '/dev/DiskName2' NAME LogicalDiskNameForASM2 ; You can also add a disk without specifying a name, now the system generated name will be used. SQL> ALTER DISKGROUP DiskGroupName ADD DISK '/dev/DiskName' ;

2.2.

ASM - Vary disk(s) offline in a diskgroup vary disk(s) offline in a diskgroup. SQL> ALTER DISKGROUP DiskGroupName OFFLINE DISK LogicalDiskNameForASM ;

2.3.

ASM - Dropping disk(s) from a diskgroup Caution: The ALTER DISKGROUP...DROP DISK statement returns before the drop and rebalance operations are complete. Do not reuse, remove, or disconnect the dropped disk until the HEADER_STATUS column for this disk in the V$ASM_DISK view changes to FORMER. You can query the V$ASM_OPERATION view to determine the amount of time remaining for the drop/rebalance operation to complete. For more information When dropping a member with asm_power_limit set to 0, you must rebalance manually to be able to drop the disk. If you first set the asm_power_limit to a value higher than 0 before issueing the alter diskgroup drop disk command the operation will complete automatically. Don’t forget to set asm_power_limit back to 0 after the disk is dropped. Drop a disk from a diskgroup (single disk or multiple disks) SQL> ALTER DISKGROUP DiskGroupName DROP DISK LogicalDiskNameForASM ; SQL> ALTER DISKGROUP DiskGroupName DROP DISK LogicalDiskNameForASM1, LogicalDiskNameForASM2 ;

2.4.

ASM - Rebalance disks after adding or dropping disk(s) You need to rebalance the data to all the disks within a disk group. First login to the ASM instance as sysdba, next… SQL> alter system set asm_power_limit=10; SQL> Alter diskgroup DiskGroupName rebalance power 10 ; You can check rebalancing progress using following command from another session. SQL> select * from v$asm_operation; When the rebalance is done: SQL> alter system set asm_power_limit=0;

2.5.

ASM - Mount all diskgroups Mount all diskgroups in the ASM instance SQL> ALTER DISKGROUP ALL MOUNT ;

RAC Commands_v1.1

Page 2 of 7

2.6.

ASM - Views ASM Dynamic Views: ASM Instance Information V$ASM_ALIAS V$ASM_CLIENT V$ASM_DISK V$ASM_DISKGROUP

V$ASM_FILE V$ASM_OPERATION V$ASM_TEMPLATE

Shows every alias for every disk group mounted by the ASM instance Shows which database instance(s) are using any ASM disk groups that are being mounted by this ASM instance Discovers and lists disks in ASM_DISKSTRING, including disks that are not part of any ASM disk group [name, allocation, unit_size, compatibility, database_compatibility-] Describes information about ASM disk groups mounted by the ASM instance. Discovers disks in ASM_DISKSTRING Lists each ASM file in every ASM disk group mounted by the ASM instance Like its counterpart, V$SESSION_LONGOPS, it shows each long-running ASM operation in the ASM instance Lists each template present in every ASM disk group mounted by the ASM instance

Fixed views X$KFALS X$KFDSK X$KFFIL X$KFGRP X$KFGMG X$KFKID X$KFNCL X$KFMTA

ASM ASM ASM ASM ASM ASM ASM ASM

aliases disks files disk groups operations disk performance clients templates

11g requires compatible.asm=11.1 V$PWFILE_USERS(sysasm) V$ASM_DISK_IOSTAT V$ASM_ATTRIBUTE

2.7.

ASM - debugging ASMCMD Setting DBI_TRACE=1 on unix level will put asmcmd in trace-mode This will enable debugging for example connectivity issues like “ASMCMD-08202: internal error:” $ export DBI_TRACE=1 $ asmcmd [-a sysdba] DBI 1.50-ithread default trace level set to 0x0/1 (pid 9764996) -> DBI->connect(dbi:Oracle:, , ****, HASH(0x1108ae980)) -> DBI->install_driver(Oracle) for aix perl=5.008003 pid=9764996 ruid=3501 euid=3501 install_driver: DBD::Oracle version 1.15 loaded from /rac01/app/asm/product/11.1.0/perl/lib/site_perl/5.8.3/aix-thread-multi-64all/DBD/Oracle.pm
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF