Monday, February 25, 2013

Oracle Premier, Extended and Sustaining Support Info


Oracle 10g R2 is going out of Extended Support by Jul 2013. It’s time to upgrade your database to 11g.

Many users not aware of Oracle product Lifetime support.  It is simple, predictable and flexible


Premier support usually ends 5 years after the release of a version. After ending the premier support, we can buy Extended support which covers next 3 years and we have to pay extra fee.

Please find the Extended Support fee.
  • Year 6 after product release: 10% of current year’s Software Update License & Support
  • Year 7 after product release: 20% of current year’s Software Update License & Support
  • Year 8 after product release: 20% of current year’s Software Update License & Support
Extended Support offers the following:
  • Updates, fixes and security alerts
  • Tax, legal and regulatory updates
  • Upgrade scripts
  • Technical support
  • Major product and technology releases
After ending the extended support, Sustaining Support kicks off but it does not include:
  • New updates, fixes, security alerts, data fixes, and critical patch updates
  • New tax, legal, and regulatory updates
  • New upgrade scripts
  • Certification with new third-party products/versions
  • Certification with new Oracle products
For more info please see the detailed benefits and key features comparison.
http://www.oracle.com/us/support/lifetime-support/index.html

Regards
Satishbabu Gunukula, Oracle ACE

ORA-07445 exception encountered, ORA-04030 out of processes memrory

I have received below error on one of the 10gR2 database.

ORA-07445: exception encountered: core dump [kohfrem()+145] [SIGSEGV] [Address not mapped to object] [0x2B69FFFFFFF8] [] []
 

ORA-04030: out of process memory when trying to allocate 16408 bytes (koh-kghu sessi,pmucpkl kolctx)

If user or application running many jobs then the processes running the jobs may use an increasing amount of memory over time and the job queue process may fail with ORA-4030 errors.

In that case you might be hitting a bug 7715994 and refer below Metalink note
Bug 7715994 Memory leak / ORA-4030 when running many jobs
The bug has been fixed in 11.2.0.1. After spending many hours I found below workaround
Work around: When running large numbers of jobs, restart the session occasionally.

If user or application using UTL_FILE package then you see a constant growth of memory & the heapdumps suggest "koh-kghu sessi" heap is growing as a part of allocating chunks marked with "pmucalm coll", then you might be hitting the bug 7197637.

Refer below metalink note
Bug 7197637: MEMORY LEAK LEADING TO ORA-4030 (KOH-KGHU SESSI,PMUCALM COLL) USING UTL_FILE

The affected Oracle versions with this bug are 10.2.0.4 and 11.1.0.6 and it is fixed in 11gR2.
Workaround: Do not open too many files.

NOTE that users might expose Bug 9928290 due to regression exposed in the bug fix 7197637 and it is advised to apply both patches to fix the issue. But patch 9928290 is available from version 10.2.0.4.4

If your database running in <= 10.2.0.4.4 then you need to choose one of the below options.

1. Upgrade the database to 10.2.0.5 (using patch 8202632) and apply patches 9928290, 7197637
or
2. Upgrade the database to 10.2.0.4.4 PSU (using patch 9352164) and apply patches 9928290, 7197637

There are many bugs caused by this error. Check below metalink note for known bugs and possible actions in various versions

OERR: ORA 4030 "out of process memory when trying to allocate %s bytes (%s,%s)"

Please note that there are different errors across the various versions. I would recommend checking the Look-up Tool to find the Actual Cause and Possible solutions and contact Oracle Support.

ORA-600/ORA-7445/ORA-700 Error Look-up Tool [Article ID 153788.1]
Master Note for Diagnosing ORA-7445 and Related Core Dumps [Article ID 1092855.1]

Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Thursday, February 7, 2013

How to Change Oracle DBNAME and DBID

When you change DBID of the database all previous backups will become UNUSABLE and you must open the database with RESETLOGS option. Once you change the DBID make sure you take database backup immediately.

If you only change DB_NAME then old backups are still USABLE and you NO need to open the database with RESETLOGS options. But you need to update the database name in initialization parameter file and need to re-create password file.

Follow the steps in Changing the DB_NAME and DBID:
1. Take backup of the Database

2. Drop the DB Console, if any.
For DB Control 10.1.x
    $ ORACLE_HOME/bin/emca -x <sid>
For DB Control 10.2.x and 11.x
    $ORACLE_HOME/bin/emca -deconfig dbcontrol db

3. Shutdown and Start the database in MOUNT stage
SQL> STARTUP MOUNT;

4. Use NID utility to change the Database Name and Database ID
$ nid TARGET=sys/password@alias as sysdba DBNAME=NEW_DBNAME
Or
$ nid TARGET=sys/password as sysdba DBNAME=NEW_DBNAME

The nid utility performs the validation of the controlfile and datafiles. Once the validation successful it will prompt you to confirm the database name change operation.

Please see the below output (changing DBNAME from ORCL1 to ORCL5)

$ nid TARGET=sys/xxxxxx@ORCL1 as sysdba  DBNAME=ORCL5

DBNEWID: Release 10.2.0.4.0 - Production on Mon Feb 03 10:01:06 2012

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

Connected to database ORCL1 (DBID=5989889872)

Connected to server version 10.2.0

Control Files in database:
   /u01/oradata/ORCL1/TESTDB01.ctl
    /u02/oradata/ORCL1/TESTDB02.ctl
    /u03/oradata/ORCL1/TESTDB03.ctl


Change database ID and database name ORCL1 to ORCL5? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 5989889872 to 7984565578


After successfully changing the database name the utility will shutdown the database.

5. Update DB_NAME in initialization parameter file with NEW Database name and rename the parameter file to match NEW Database Name.

6. Mount the database and open with RESETLOGS
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE OPEN RESETLOGS;

7. Recreate the password file using below syntax
$ orapwd file=<fname> password=<password> entries=<users> force=<y/n> nosysdba=<y/n>

8. Change the database name in tnsnames.ora and listener.ora (in case of static)  and reload the listener
$ lsnrctl reload

9. Recreate the DB console, if using
$ emca -config dbcontrol db -repos recreate

10. Backup the Database

For Windows: You must recreate the service so the correct name and parameter file are used
C:\> oradim -delete -sid ORCL1
C:\> oradim -new -sid ORCL5 -intpwd password -startmode auto -pfile c:\oracle\product\10.2.0\dbhome_1\dbs\spfileORCL5.ora

Follow the steps in Changing ONLY DBNAME:
Follow the steps 1-3 in above section

4. Use NID utility to change the DBNAME

$ nid TARGET=SYS/password@alias as sysdba DBNAME=NEW_DBNAME SETNAME=YES
or
$ nid TARGET=SYS/password as sysdba DBNAME=NEW_DBNAME SETNAME=YES

5. Update DB_NAME in initialization parameter file with NEW Database name and rename the parameter file to match new DBNAME

6. Startup the database in normal mode
SQL> STARTUP;

Please note that you no need to open the database with resetlogs option as you only changed database the DBNAME.

Follow the steps 7-10 in above section

Follow the steps in Changing ONLY DBID:

1. Take backup of the Database

2. Shutdown and Start the database in MOUNT stage
SQL> STARTUP MOUNT;

3. Use NID utility to change the DBID

$ nid TARGET=SYS/password@alias as sysdba
or
$ nid TARGET=SYS/password as sysdba

4. Mount the database and open with RESETLOGS
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE OPEN RESETLOGS;

5. Backup the Database

You can refer metalink note “Note.278100.1 How To Drop, Create And Recreate DB Control In A 10g Database”

Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Friday, February 1, 2013

ORA-01031: insufficient privileges

The ORA-01031 is very generic error and normally users will receive this error when users don’t have appropriate privilege. Users may able to connect to database successfully using password authentication and OS authentication may fails with “ORA-01031”.

H:\>sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 1 17:00:13 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect /as sysdba
ERROR:
ORA-01031: insufficient privileges

When user try to connect RMAN receives the same error “ORA-01031”

RMAN> connect target /

RMAN-00571: =================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ==========
RMAN-00571: =================================================
ORA-01031: insufficient privileges


01031, 00000, "insufficient privileges"
// *Cause: An attempt was made to change the current username or password
//         without the appropriate privilege. This error also occurs if
//         attempting to install a database without the necessary operating
//         system privileges.
//         When Trusted Oracle is configure in DBMS MAC, this error may occur
//         if the user was granted the necessary privilege at a higher label
//         than the current login.
// *Action: Ask the database administrator to perform the operation or grant
//          the required privileges.
//          For Trusted Oracle users getting this error although granted the
//          the appropriate privilege at a higher label, ask the database
//          administrator to regrant the privilege at the appropriate label.

For Windows:-

The user must be a member of ora_dba group.Go to Local Users and Groups on the Computer Management Console, select ora_dba group and add the user to the group. 

If users still see the same issues then check the SQLNET.AUTHENTICATION_SERVICES parameter in SQLNET.ora file and make sure that the parameter value should be set to NTS.

For Unix/Linux:-

The user must me part of DBA group, so add the user to the group.

$ usermod -G <group> <user>

After adding the use to DBA group, if users are seeing the same error then check the SQLNET.AUTHENTICATION_SERVICES parameter in sqlnet.ora file and make sure that the parameter should not be present or value set to ALL.

Irrespective of the Operating system make sure you set correct values for ORACLE_SID and ORACLE_HOME and other environment variables.

For more information refer below Metalink notes
OERR: ORA 1031 "insufficient privileges" [ID 18622.1]
Troubleshooting ORA-1031: Insufficient Privileges While Connecting As SYSDBA [ID 730067.1]


Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Friday, January 4, 2013

Error while loading shared libraries: libdb.so.2 - After Migrating REHL4 to REHL5


We have migrated Oracle Agile application from RedHat Linux 4 to RedHat Linux 5 and while starting up the Agile application we have received following error.

$ opmnctl startall
opmnctl: starting opmn and all managed processes...
================================================================================
opmn id=agile:6201
    1 of 2 processes started.

ias-instance id=plm922.etna.corp.intusurg.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------
ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server/

Error
--> Process (index=1,uid=6575556334,pid=75645)
    failed to start a managed process after the maximum retry limit
    Log:
     /oracle/product/10.1.3.1/OracleAS/opmn/logs//HTTP_Server~1.log

From HTTP Serve log, we have found that Apache service failed while coming up. We have found below error message

/oracle/product/10.1.3.1/OracleAS/Apache/Apache/bin/apachectl startssl: execing httpd
/oracle/product/10.1.3.1/OracleAS Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory

There is no shared library/usr/lib/ libdb.so.2 and found that the soft link is missing.

You may see this error with applications that are using Oracle Application services after cloning or migrating from REHL 4 to REHL5.

To resolve the issue follow the steps
1. Stop the Oracle Application Service
2. Login as root and create the soft link
   # ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
3. Start the Oracle Application Service.

Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com