Archive for July, 2012

Creation of Packages & ZIP files to send to Oracle Support using ADRCI

For instance, we found problem in Database with Problem ID 1.


adrci> show problem

ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                             
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
1                    ORA 7445 [qcstda()+702]                                     6201                 2011-06-01 10:22:08.924000 +02:00       
1 rows fetched


Now, if you can't solve this problem on your own and you need to claim support from Oracle. You can gather all the required information with a method called “Incident Packaging Service” (IPS).


adrci> ips create package problem 1 correlate all
Created package 2 based on problem id 1, correlation level all


This did not yet create a ZIP file and is therefore referred to as “Logical Package”. The ZIP file is generated from the Logical Package that was created.


adrci> ips generate package 2 in "/home/oracle"  
Generated package 2 in file /home/oracle/ORA7445qc_20110601112533_COM_1.zip, mode complete

Thanks
A Rahim Khan

expdp/impdp version issue

First of all, there is nothing to do with Version parameter while using impdp. However, you can mention version while taking logical backup using expdp.

You have to use Version Parameter with expdp if want to import this logical backup in a Lower/Down Version. For instance, Your Production Database is 11g R2 ,Test Database is 11g R1 and you want restore logical backup on 11g r1 taken from 11 g r2 Server. In this kind of scenario you need to use Version Parameter while using expdp as shown below.


expdp system/****** schemas=hr directory=backup_dir dumpfile=hr18072012.dmp logfile=hr18072012.log Version=11.1.0

Thanks
A Rahim Khan

Oracle Database Cold Backup Script

Execute this bash script, it will do the rest of your Database Cold Backup.

ColdBackup.sh


#!/bin/sh
/oracle/app/product/10.2.0/db_1/bin/sqlplus /nolog <<EOF
conn /as sysdba
@/home/oracle/ColdBackupScript.sql
EOF

Continue reading

analyze redo/archive using logminer

First of all, query on V$DATABASE to check out if SUPPLEMENTAL_LOG_DATA_MIN is YES OR NO.


SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;

You can use this following query to alter SUPPLEMENTAL_LOG_DATA_MIN flag.


ALTER DATABASE ADD SUPPLEMENTAL LOG DATA ;

Continue reading