Saturday, November 24, 2012

ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled

Issue :

alter database open resetlogs;
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled

Cause:   When try to open database with resetlogs option after restoring rac db on non rac db.  

Workaround:
 1._no_recovery_through_resetlogs=TRUE set in pfile
 2.startup mount
 3.alter database open resetlogs;

Wednesday, November 21, 2012

Patchset Silent Installation

Method 1:

../runInstaller -silent  -ignoreSysprereqs  \
-responseFile /u01/Disk1/response/patchset.rsp  \
ORACLE_HOME="/u01/app/oracle/product/10.2.0.5" \
ORACLE_HOME_NAME="Ora10gHome" \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true


Method 2:

Update below setting on response file

ORACLE_HOME=/u01/app/oracle/product/10.2.0.5
ORACLE_HOME_NAME=Ora10gHome
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true

Then invoke runinstaller


./runInstaller -silent -responseFile  /u01/Disk1/response/patchset.rsp  -ignoreSysprereqs







Error & Workaround:

If you don't modify SECURITY_UPDATES_VIA_MYORACLESUPPORT & DECLINE_SECURITY_UPDATES values then below error will be encountered

SEVERE:Values for the following variables could not be obtained from the command line or response file(s):
  MYORACLESUPPORT_USERNAME(MyOracleSupportUsername)
Silent install cannot continue.






Sunday, November 18, 2012

Oracle 11gR2 Silent Installation

Please modify db_install.rsp response like below.




oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=vm1.domain.com

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en

ORACLE_HOME=/u01/app/oracle/product/11.2.0.3

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.DBA_GROUP=dba

DECLINE_SECURITY_UPDATES=TRUE

oracle.installer.autoupdates.downloadUpdatesLoc=SKIP_UPDATES



Run below command :



./runInstaller -silent -executePrereqs -responseFile "/u01/database/response/db_install.rsp"

Tuesday, November 13, 2012

PSU auto patch on 10g CRS_HOME


1.Opatch version should be earlier version (>11)
2.Configuare ocm.rsp file
     cd /u03/crs/OPatch/ocm/bin
   
      ls -lrt
     total 16
     -rwxr-----  1 oracrs oinstall 8486 Dec  7  2010 emocmrsp

    execute emocmrsp 

     ./emocmrsp

 [oracle@vm1 bin]$ ls -lrt
total 16
-rwxr-----  1 oracrs oinstall 8486 Dec  7  2010 emocmrsp
-rwxrwxr-x  1 oracrs oinstall  623 Nov 13 09:35 ocm.rsp
[oracle@vm1 bin]$


[root@vm1 9952245]# opatch auto /home/oracrs/psu/9952245 -oh /u03/crs
auto_patch.pl: log file is /home/oracrs/psu/9952245/opatchauto_2012-11-13_10:33:35.log
Discovering environment to patch

Checking if Clusterware is up

Looking for configured cluster nodes
vm1 vm2

Getting Local node name

Looking for configured databases on node vm1
Databases configured on node vm1 are: CAR

Determining ORACLE_HOME paths for configured databases
Retrieving configured services for Database CAR
There are 1 services configured for Database CAR
asm home is /u02/app/oracle/product/10.2.0/db_1

Oracle Home /u02/app/oracle/product/10.2.0/db_1 is configured with Database(s)-> CAR
opatch version is 11.2.0.1.4
/u03/crs/OPatch/opatch is bundled with OCM, Enter the absolute OCM response file path:
/u03/crs/OPatch/ocm/bin/ocm.rsp
Oracle CRS user is oracrs
Cluster nodes are vm1 vm2
Node to patch is vm1
Using /u03/crs/OPatch/opatch for opatch
The patch is applicable for this CRS Home /u03/crs

Patch node vm1? (y/n/abort/N/N1-N2/help):

y

Applying patch 9952245 on node vm1

 stopping instance on vm1 with /u02/app/oracle/product/10.2.0/db_1/bin/srvctl stop instance -d CAR -i CAR1

 stopping ASM on vm1 with /u03/crs/bin/srvctl stop asm -n vm1

 stopping listener on vm1 with /u03/crs/bin/srvctl stop listener -n vm1

 stopping nodeapps on vm1 with /u03/crs/bin/srvctl stop nodeapps -n vm1

 shutting  down CRS stack on vm1 with /u03/crs/bin/crsctl stop crs

Sleeping 15 second(s)
Failure 1 contacting CSS daemon
Cannot communicate with EVM
Cannot communicate with CRS

 Executing /home/oracrs/psu/9952245/custom/scripts/prerootpatch.sh -crshome /u03/crs -crsuser oracrs as root on vm1

 Executing /home/oracrs/psu/9952245/custom/scripts/prepatch.sh -crshome /u03/crs as oracrs on vm1

 Executing /u03/crs/OPatch/opatch napply -local -silent -ocmrf /u03/crs/OPatch/ocm/bin/ocm.rsp -oh /u03/crs -id 9952245 as oracrs on vm1

 Executing /home/oracrs/psu/9952245/custom/scripts/postpatch.sh -crshome /u03/crs as oracrs on vm1

 Executing /home/oracrs/psu/9952245/custom/scripts/postrootpatch.sh -crshome /u03/crs as root on vm1

 Starting services for CAR on vm1

List of patched nodes:  vm1

auto_patch.pl finished


Errors & Workarounds:

Error 1:

Using /u03/crs/OPatch/opatch for opatch
Failed to load the patch object.  Possible causes are:
  The specified path is not an interim Patch shiphome
  Meta-data files are missing from the patch area
  Patch location = /home/oracrs/psu
  Details = Input metadata files are missing.
.....
 Executing /home/oracrs/psu/custom/scripts/prerootpatch.sh -crshome /u03/crs -crsuser oracrs as root on vm1

verify failure: exit code 32512 for prerootpatch_crs

Action failed, do you want to retry it? (y/n/abort/N/N1-N2/help):


Solution:
         Unzipped patch location should be vaild location
 
Invalid Path: /home/oracrs/psu
 
Valid Path : /home/oracrs/psu/9952245
 

Error 2:

 Executing /u03/crs/OPatch/opatch napply -local -silent -ocmrf /u03/crs/OPatch/ocm/bin/ocm.rsp -oh /u03/crs -id 9952245 as oracrs on vm1

verify failure: exit code 18688 for patch_crs

Action failed, do you want to retry it? (y/n/abort/N/N1-N2/help):


Solution :

          Required amount of space(557321672) is not available.

         CRS_HOME free space should be >600mb
 

Monday, November 12, 2012

expdp fails with ORA-31626 ORA-31637 ORA-06512 ORA-31635 errors


Error:

 ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user SYSTEM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 798
ORA-31635: unable to establish job resource synchronization

Workaround:

AQ_TM_PROCESSES process should be 1.

Set  AQ_TM_PROCESSES = 1 parameter and bounce the database will resolve issue.


Issue:

 V$XML_AUDIT_TRAIL Returns No Rows :

Workaround :

This is bug on 11.2.0.2

Refer Metalink ID  (Doc ID 1267954.1) .Have to Apply Patch 9438890 to solve this problem.

Tuesday, November 6, 2012

Showing Idle Instance xe


Issue Description :

  XE database is running fine but while login to database it is showing idle instance.

$sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 12 18:32:49 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to Idle Instance.

SQL>   Workaround:   LIB path is caused for this issue. you have run to oracle_env.sh script from ORACLE_HOME/bin location.   add  script on .bash_profile   $ cat .bash_profile

. /opt/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 12 18:32:49 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL>