Friday, May 18, 2012

Applying patch through Opatch:SQLPLUS slowness: Bug 9593134: DNS OR NIS MIS-CONFIGURATION CAN CAUSE SLOW DATABASE CONNECTS

Hi,
We have recently hit a bug in our single instance standalone DB(11.2.0.1) on AIX 6.1(64 bits).
Description of problem:
$sqlplus t24/*****@EMR20
<takes mostly 1 or 2 minutes to connect>

Solution: 
Download and apply patch 9593134
Bug 9593134: DNS OR NIS MIS-CONFIGURATION CAN CAUSE SLOW DATABASE CONNECTS

Procedure:

1) Download the correct patch from support.oracle.com
2) Transfer the zipped patch file to the server and unzip it there at required directory


 $ unzip -d /home/oracle/sqlpatch/ p9593134_112010_AIX64-5L.zip
   Archive:  p9593134_112010_AIX64-5L.zip
   creating: /home/oracle/sqlpatch/9593134/
   creating: /home/oracle/sqlpatch/9593134/files/
   creating: /home/oracle/sqlpatch/9593134/files/lib/
   creating: /home/oracle/sqlpatch/9593134/files/lib/libntcp11.a/
  inflating: /home/oracle/sqlpatch/9593134/files/lib/libntcp11.a/ntt.o
   creating: /home/oracle/sqlpatch/9593134/etc/
   creating: /home/oracle/sqlpatch/9593134/etc/config/
  inflating: /home/oracle/sqlpatch/9593134/etc/config/inventory.xml
  inflating: /home/oracle/sqlpatch/9593134/etc/config/actions.xml
  inflating: /home/oracle/sqlpatch/9593134/etc/config/deploy.xml
   creating: /home/oracle/sqlpatch/9593134/etc/xml/
  inflating: /home/oracle/sqlpatch/9593134/etc/xml/GenericActions.xml
  inflating: /home/oracle/sqlpatch/9593134/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: /home/oracle/sqlpatch/9593134/README.txt

$  which unzip
/u01/app/oracle/product/11.2.0/dbhome_1/bin/unzip


$ opatch
ksh: opatch:  not found.
$ cd $ORACLE_HOME
$ ls -ltr|grep -i opat
drwxr-xr-x    6 oracle   oinstall       4096 May 18 03:05 OPatch
$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1
3) Add the opatch to PATH variable if it is not already done
$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:/usr/java6/jre/bin:/usr/java6/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin:.:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch
$ opatch
Invoking OPatch 11.1.0.6.6

Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.
....................
...................

4) Check for opatch lsinventory to check things all good
$ opatch lsinventory
Invoking OPatch 11.1.0.6.6

Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.2.0.1.0
OUI location      : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-05-18_03-11-11AM.log

Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2012-05-18_03-11-11AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.1.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.
5) Stop all database services running out of that $ORACLE_HOME (optionally listener service also for my case i had stopped listener service also).

6) Start the opatch apply , you have to be in the unzipped folder "/home/oracle/sqlpatch/9593134" location for that.



$ opatch apply
Invoking OPatch 11.1.0.6.6


Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.




Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.2.0.1.0
OUI location      : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2012-05-18_03-20-24AM.log


Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt


ApplySession applying interim patch '9593134' to OH '/u01/app/oracle/product/11.2.0/dbhome_1'


Running prerequisite checks...
Patch 9593134: Optional component(s) missing : [ oracle.network.cman, 11.2.0.1.0 ]


OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.




Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1')




Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '9593134' for restore. This might take a while...
Backing up files affected by the patch '9593134' for rollback. This might take a while...


Patching component oracle.network.rsf, 11.2.0.1.0...
Updating archive file "/u01/app/oracle/product/11.2.0/dbhome_1/lib/libntcp11.a"  with "lib/libntcp11.a/ntt.o"


Patching component oracle.rdbms, 11.2.0.1.0...


Patching component oracle.rdbms.rsf, 11.2.0.1.0...
Running make for target client_sharedlib
Running make for target ioracle


OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ld: 0711-415 WARNING: Symbol ldxdts is already exported.
ld: 0711-415 WARNING: Symbol ldxsto is already exported.
ld: 0711-415 WARNING: Symbol lnxadd is already exported.
ld: 0711-415 WARNING: Symbol lnxcopy is already exported.
ld: 0711-415 WARNING: Symbol lnxmin is already exported.
ld: 0711-415 WARNING: Symbol lnxmul is already exported.
ld: 0711-415 WARNING: Symbol lnxnur is already exported.
ld: 0711-415 WARNING: Symbol lnxren is already exported.
ld: 0711-415 WARNING: Symbol lnxsca is already exported.
ld: 0711-415 WARNING: Symbol lnxshift is already exported.
ld: 0711-415 WARNING: Symbol lnxsni is already exported.
ld: 0711-415 WARNING: Symbol lxgu2t is already exported.
ld: 0711-415 WARNING: Symbol sldxgd is already exported.
ld: 0711-224 WARNING: Duplicate symbol: .aio_nwait_timeout64
ld: 0711-224 WARNING: Duplicate symbol: aio_nwait_timeout64
ld: 0711-224 WARNING: Duplicate symbol: .aio_nwait64
ld: 0711-224 WARNING: Duplicate symbol: aio_nwait64
ld: 0711-224 WARNING: Duplicate symbol: fc_softc
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-319 WARNING: Exported symbol not defined: count__21TxsOqSourceDefinitionFP31TxsOqSourceDefinitionController
ld: 0711-319 WARNING: Exported symbol not defined: cout__3std
ld: 0711-319 WARNING: Exported symbol not defined: create11gMeasure__26TxsOqAWExpressionGeneratorFRC9xswstringPC18TxsOqAWMeasureInfoP25TxsOqSQLGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWDimensionColumn__27TxsOqSQLBaseSelectStatementFP24TxsOqMdmPrimaryDimensionP24TxsOqSQLBaseSelectColumnP25TxsOqSQLGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWDimensionColumn__27TxsOqSQLBaseSelectStatementFP27TxsOqMdm10gPrimaryDimensionP24TxsOqSQLBaseSelectColumnP25TxsOqSQLGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWLevelHierarchyHolder__23TxsOqAWGenerationHelperFPC19TxsOqSourceSnapshotP22TxsOqGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWLevelHolder__23TxsOqAWGenerationHelperFPC19TxsOqSourceSnapshotP22TxsOqGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWMeasureInfo__23TxsOqAWGenerationHelperFPC19TxsOqSourceSnapshotP22TxsOqGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAWOffsetHolder__23TxsOqAWGenerationHelperFPC19TxsOqSourceSnapshot20ExsOqMdm10gLevelTypeiP22TxsOqGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAncestorsTableHolder__28TxsOqSQLAncestorsTableHolderFP33TxsOqSQLDimensionExpressionHolderP25TxsOqSQLGenerationContext
ld: 0711-319 WARNING: Exported symbol not defined: createAndMapLevel__25TxsOqLegacyMetadataReaderFPUcN61P24TxsOqMdmPrimaryDimensionP22TxsOqMdmLevelHierarchyPP17TxsOqSynBaseQueryPP25TxsOqMdmHierarchyLevelMapN31UiT15_
...........................
............................



ld: 0711-773 WARNING: Object /u01/app/oracle/product/11.2.0/dbhome_1/lib//libordsdo11.a[mdrt.o], imported symbol kcbstdbz_
        Symbol was expected to be local. Extra instructions
        are being generated to reference the symbol.
ld: 0711-773 WARNING: Object /u01/app/oracle/product/11.2.0/dbhome_1/lib//libordsdo11.a[mdrcnc.o], imported symbol mdrcnccmt_
        Symbol was expected to be local. Extra instructions
        are being generated to reference the symbol.
ld: 0711-783 WARNING: TOC overflow. TOC size: 219440    Maximum size: 65536
        Extra instructions are being generated for each reference to a TOC
        symbol if the symbol is in the TOC overflow area.


--------------------------------------------------------------------------------
OPatch Session completed with warnings.


OPatch completed with warnings.
$

7) Now when checked with my db connection through sqlplus tns connection string it was as faster.





No comments:

Post a Comment