Posts

How to reset password in oracle database:

Use this query to get the password of the user in the database: select user#, name,password from SYS.user$ where name = '<USERNAME>'; Then use this below to reset the password alter user <username> identified by values '<PASSWORD>';

How to resolve ORA-27123 error:

when getting error while starting RAC db,  and all the raw device for storage has the right permission and +ASM is up but db refuse to start with below error: oradb@HOSTNAME01:/dev $ ls -lrt asm-disk* lrwxrwxrwx 1 root root 3 Mar  6 20:43 asm-disk3 -> sde lrwxrwxrwx 1 root root 3 Mar  6 20:43 asm-disk2 -> sdc lrwxrwxrwx 1 root root 3 Mar  6 20:43 asm-disk5 -> sdg lrwxrwxrwx 1 root root 3 Mar  6 20:43 asm-disk4 -> sdf lrwxrwxrwx 1 root root 3 Mar  6 20:48 asm-disk1 -> sdd oradb@HOSTNAME01:/dev $    INST_ID GROUP_NUMBER NAME                      State ---------- ------------ ------------------------- -----------          1            1 DG_01                     MOUNTED          1            2 FRA                       MOUNTED          1            3 OCR_VOTE                  MOUNTED    INST_ID NAME                      PATH                           State       HEADER_STATU ---------- ------------------------- ------------------------------ ----------- ------------        

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