Posts

How to repair a disk in a diskgroup

SUMMARY ======== "DG01" diskgroup cannot be mounted due to one disk member is missing: ====================================================== SQL> ALTER DISKGROUP DG01 MOUNT /* asm agent *//* {1:16801:2} */ NOTE: cache registered group DG01 number=1 incarn=0x2929b317 NOTE: cache began mount (first) of group DG01 number=1 incarn=0x2929b317 NOTE: Assigning number (1,1) to disk (/dev/asm-disk5) Sat Feb 14 06:41:49 2015 ERROR: no read quorum in group: required 1, found 0 disks NOTE: cache dismounting (clean) group 1/0x2929B317 (DG01) NOTE: messaging CKPT to quiesce pins Unix process pid: 7194, image: oracle@SLSLMEDIDBOP01 (TNS V1-V3) NOTE: dbwr not being msg'd to dismount NOTE: lgwr not being msg'd to dismount NOTE: cache dismounted group 1/0x2929B317 (DG01) NOTE: cache ending mount (fail) of group DG01 number=1 incarn=0x2929b317 NOTE: cache deleting context for group DG01 1/0x2929b317 GMON dismounting group 1 at 18 for pid 29, osid 7194 NOTE: Dis
SOLUTION for rman error: RMAN-06429: RCVCAT database is not compatible with this version of RMAN $ rman target / catalog rman/********@CATDB Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 14 18:05:00 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. connected to target database:XXX (DBID=607******5) connected to recovery catalog database recovery catalog is partially upgraded to 11.02.00.03 RMAN> crosscheck archivelog all; ORACLE error from recovery catalog database: ORA-06550: line 1, column 41: PLS-00201: identifier 'DBMS_RCVMAN.GETPACKAGEVERSION' must be declared ORA-06550: line 1, column 34: PL/SQL: Statement ignored recovery catalog is partially upgraded to 11.02.00.03 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of crosscheck comman

HOW TO TAKE EXPORT BACKUP/IMPORT OF TABLES

When preparing to taking export backup of application tables from a target database(source) and importing to another database(destination), You need to do the following: 1. You need to create directory where the dump file to be created with reside. CREATE DIRECTORY DUMPDIR AS '<filesystem_path with enough space>'; example: CREATE DIRECTORY DUMPDIR AS '/u01/export/dumpdir'; 2. Grant required permission to the directory. GRANT READ, WRITE ON DIRECTORY DUMPDIR TO <USERNAME>; 3. Select the properties of the objects/tables to be exported in the source database. select owner,segment_name,segment_type,tablespace_name, sum(bytes/1024/1024) from dba_segments where segment_name IN ('table_name','object_name','table_name','table_name'...) group by owner,segment_name,segment_type,tablespace_name ; example: --------------------------------------------------------------------------------------------------------------------------------- OWNE

SCRIPT TO TAKE ARCHIVE BACKUP TO TAPE AND DELETE INPUT

This script is handy when you are having space challenge in your storage either +asm or filesyste. First connect to the target database and then to the catalog database. crosscheck archivelog all; resync catalog; run { allocate channel c1 TYPE 'sbt_tape'; allocate channel c2 TYPE 'sbt_tape'; allocate channel c3 TYPE 'sbt_tape'; backup archivelog all delete input; release channel c1; release channel c2; release channel c3; }

how to resolve ORA-00059: maximum number of DB_FILES exceeded

SQL> show parameter db_files NAME                                 TYPE        VALUE ------------------------------------ ----------- ------------------------------ db_files                             integer     200 SQL> select count(*) from v$datafile;   COUNT(*) ----------        200 This issue result as a result of datafiles in the database has reached the number of db_files parameter in the database. To resolve this, follow the below steps: First, take the backup of the spfile with the below command: cd $ORACLE_HOME/dbs $ cp -p spfileSID.ora spfileSID.ora_11082014 Also create a backup copy of the pfile in /tmp directory with below command: SQL> create pfile='/tmp/pfileSID.ora' from spfile; File created. SQL> alter system set db_files=800 scope=spfile; System altered. Bounce the database for the change to take effect. SQL> shutdown immediate; SQL> startup
How to resolve error ORA-15032,ORA-15031,ORA-15025,ORA-15056 when adding a disk to asm. SQL> ALTER DISKGROUP ASM_FRA ADD DISK '/dev/dm-51'; ALTER DISKGROUP ASM_FRA ADD DISK '/dev/dm-51' * ERROR at line 1: ORA-15032: not all alterations performed ORA-15031: disk specification '/dev/dm-51' matches no disks ORA-15025: could not open disk "/dev/dm-51" ORA-15056: additional error message Linux-x86_64 Error: 13: Permission denied Additional information: 42 Additional information: 1927546192 I wanted to add  the following disk: (/dev/dm-51,/dev/dm-52,/dev/dm-53) First check the permissions on this files after the Unix admin has provision it. $ls -lrt /dev/dm* brw-rw---- 1 root disk 253, 19 Jan 31 13:46 /dev/dm-19 brw-rw---- 1 root disk 253, 53 Mar 2 21:04 /dev/dm-53 brw-rw---- 1 root disk 253, 52 Mar 2 21:04 /dev/dm-52 brw-rw---- 1 root disk 253, 51 Mar 2 21:04 /dev/dm-51 brw-rw---- 1 root disk 253, 46 Mar 2 21:12 /dev/dm-46 brw-r
CLEANING APPLICATION CONNECTIONS WHEN MAXIMUM NUMBER OF SESSIONS EXCEEDED. When users can't login to the database or their processes are hanging and probably getting this error: ERROR at line 1: ORA-12801: error signaled in parallel query server PZ99, instance <hostname>:<SID> (2) ORA-00018: maximum number of sessions exceeded Follow the below steps to resolve immediately so that users can connect to database: 1. login as a privilege OS user (example oracle owner) in the node having the issue. 2. run this command to show all the processes of application connection handles to the database: $ ps -ef|grep LOCAL=NO 3. Use this command to clean up connections so that users can connect: ps -ef|grep LOCAL=NO| awk '{print $2}'| xargs -i{} kill -9 {}