Thursday, June 25, 2015

Error connecting ASM ORA-15055: unable to connect to ASM instance Fatal NI connect error 12547 ORA-12547: TNS:lost contact

TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 517
ORA-15055: unable to connect to ASM instance
ORA-12547: TNS:lost contact
TNS-12545: Connect failed because target host or object does not exist


Cause:

$GRID_HOME/bin/oracle or $ORACLE_HOME/bin/oracle permission has been changed

ls -al $GRID_HOME/bin/oracle
-rwxr-x--x 1 grid oinstall 200678464 Jun 28 14:54 oracle 

ls -al $ORACLE_HOME/bin/oracle
-rwxr-x--x 1 oracle asmadmin 228886191 Jun 28 15:41 oracle

Solution:

Change permissions as below 

cd $GRID_HOME/bin
chmod 6751 oracle

cd $ORACLE_HOME/bin
chmod 6751 oracle

Once it looks as below the problem is solved...

ls -l $GRID_HOME/bin/oracle
-rwsr-s--x 1 grid oinstall 203974257 Jun 29 09:30 oracle

ls -l $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle oinstall 232399431 Jun 29 13:47 oracle

Monday, June 15, 2015

ORA-02097: parameter cannot be modified because specified value is invalid

Alert log Entry

ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00068: invalid value 4000 for parameter parallel_max_servers, must be between 0 and 3600
CKPT (ospid: 3277292): terminating the instance due to error 2097
Mon Jun 15 12:30:13 

Cause 1
It might be caused by the current system level change on the number of CPU which will shut down all the instances on the same server.

Solution

Just start the instances no need to worry oracle will take care of itself.

Cause 2

Related to parallel_max_servers wich is calculated 

PARALLEL_THREADS_PER_CPU * CPU_COUNT * concurrent_parallel_users * 5

and its value should range between 0 and 300.

Solution

Modify its value reasonably using alter system.

Saturday, June 13, 2015

Sysman password changing in oracle 11g

We may need to change the passwords of different users including sysman as a security measure or for other reason.But after changing the sysman password the enterprise manager console may not work, because we need to update the password using the following setps

step 1. Stop the dbconsole

export ORACLE_UNQNAME=DBNAME
emctl stop dbconsole

step 2. connect as sysdba and change the passowrd of sysman as required

SQL> alter user sysman idntified by XXXXX;

step 3. Update the password

emctl setpasswd dbconlole

step 4. Start the dbconsole

export ORACLE_UNQNAME=DBNAME
emctl start dbconsole


Now the enterprise manager works properly

Friday, April 24, 2015

ORA-17628: Oracle error 19505 returned by remote Oracle server


RMAN error

released channel: t1
released channel: t2
released channel: t3
released channel: t4
released channel: t5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/01/2015 09:19:11
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on t1 channel at 03/01/2015 09:19:11
ORA-17628: Oracle error 19505 returned by remote Oracle server



CAUSE

1. Shortage of space in the destination directory which will be accompanied by alertlog enter similar to the following:

ORA-19505: failed to identify file "+data"
ORA-17502: ksfdcre:4 Failed to create file +data
ORA-15041: diskgroup "DATA" space exhausted

Solution

Check the destination directory for data and archive files specified by DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST parameters respectively. Then make space in the specified diskgroup as manifested in the alert log ifle as exhausted,either by adding disks to it or deleting unwanted files from it.


2.Missing destination directory for DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST

Solution

Specify appropriate valid destinations for DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST to match with DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT.

Remember sometimes this error requires us to create destinations manually

for instance:
mkidr ARCHIVELOG/ CONTROLFILE/ DATAFILE/ ONLINELOG/ PARAMETER/ TEMPFILE

Thursday, April 16, 2015

ORA-1652: unable to extend temp segment by 128 in tablespace TEMP

Reference Note 748251.1

Possible Cause 

ISSUE IS LIKELY CAUSED BY 
Bug 5689290 - VIEW V$RMAN_BACKUP_JOB_DETAILS SLOW CAUSING DATABASE CONSOLE LOGIN TIMEOUTS
which identified an issue with excessive temp space usage by emagent.

Bug 5689290 was closed as a duplicate of
Bug 5466436 - VIEW V$RMAN_BACKUP_JOB_DETAILS SLOW CAUSING DATABASE CONSOLE LOGIN TIMEOUTS
which was subsequently closed as a duplicate of:
Bug 8434467 - SLOW PERFORMANCE FOR QUERY ON V$RMAN_BACKUP_JOB_DETAILS

Solution

1.  Upgrade to any fixed version, e.g.
12.1 (Future Release)
11.2.0.2 (Server Patch Set)
11.2.0.1 Patch 4 on Windows Platforms
11.1.0.7 Patch 37 on Windows Platforms
10.2.0.5 Patch 4 on Windows Platforms
10.2.0.4 Patch 41 on Windows Platforms
- OR -

2. Apply Patch 8434467 as available for the your actual platform and Oracle version.
- OR -

3. Use the following workaround to reduce the temp usage by emagent / dbsnmp:
exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR'); ==> deletes the statistics on the fixed object
exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR'); ==> lock that object so that statistics will not be collected in future
alter system flush shared_pool;  ==> cannot be skipped

Tuesday, March 10, 2015

ORA-01580: error creating control backup

ERROR

Soon after launching the duplication or restore rman tries to restore the controlfile before it mounts the auxiliary database,which is not possible due to the rman configuration for snapshot controlfile which we can see with 
RMAN> show all;

or specifically

RMAN>show snopshot controlfile name;

Therefore the rman session hangs for sometime and throws the following error

RMAN-00571: ======================================================
RMAN-00569: ======== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ======================================================
RMAN-03002: failure of show command at 02/01/2015 01:35:50
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 11/08/2011 01:35:50
ORA-01580: error creating control backup file /u01/snapcf_ggdb1.f


SOLUTION

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR;

sqlplus "/ as sysdba"
sys@db1> EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME('/u01/app/oracle/product/11.2/db/dbs/snapcf_db1.f');
PL/SQL procedure successfully completed.

And then restart the duplication or restore.

Tuesday, February 10, 2015

ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE

ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE

Cause: 

An attempt has been made to access a domain index that is being built or is marked failed by an unsuccessful DDL or is marked unusable by a DDL operation.

Solution:

alter index indexname rebuild; 

Saturday, February 7, 2015

ORA-01450: maximum key length (3215) exceeded

SQL> ALTER INDEX TESTUSR.FBNK_ACCOUNT#HIS_207 REBUILD ONLINE PARALLEL 140 NOLOGGING;

                                                          *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01450: maximum key length (3215) exceeded

Cause of the Problem

Consider the total length of the index which cannot exceed a certain value.The  DB_BLOCK_SIZE value takes the responsibility.
If 2K block size then maximum index key length=758
If 4K block size then maximum index key length=1578
If 8K block size then maximum index key length=3218
If 16K block size then maximum index key length=6498

How the maximum index key length is measured 

Maximum index key length=Total index length (Sum of width of all indexed column+the number of indexed columns)
+ Length of the key(2 bytes)+ROWID(6 bytes)+the length of the rowid(1 byte)

The index key size is limited by the value of db_block_size, because a key value may not span multiple blocks. So, based on the size of the block size of index depends. In fact, it is required that any index block must contain at least TWO index entries per block.

So we can say that the maximum key length for an index will be less than half of
the DB_BLOCK_SIZE. But we know that in a block there also needed space for PCTFREE, INITRANS and space for block overhead(Block Header,ROW Directory, Table Directory, etc). After considering these bytes the actual space that can be used for the Index key is actually just over 1/3 of the DB_BLOCK_SIZE.

Solution of the Problem

The causes already indicates what might be the solutions. Solution may be,
1)Increase your database block size. Create a tablespace with bigger block size and create index on that tablespace.

2)If you have index on multiple columns then you can split index to single or 2 columns so that size does not extended over it can handle.

3)Rebuild the index without online clause. That is 
ALTER INDEX index_name REBUILD;

Tuesday, January 27, 2015

ORA-27300: OS System Dependent Operation: Fork Failed With Status: 12

ALERT LOG ENTRY
Process startup failed, error stack:
Errors in file /u01/app/oracle/diag/rdbms/cbelive/PRODDB2/trace/PRODDB2_psp0_5898502.trc:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302: failure occurred at: skgpspawn3
====================CONTENT OF TRACE FILE======================
Trace file /u01/app/oracle/diag/rdbms/cbelive/PRODDB2/trace/PRODDB2_psp0_5898502.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/11.2.0.3/oracle
System name:    AIX
Node name:      t24db2
Release:        1
Version:        6
Machine:        00C941664C00
Instance name: PRODDB2
Redo thread mounted by this instance: 2
Oracle process number: 3
Unix process pid: 5898502, image: oracle@t24db2 (PSP0)

*** 2015-01-27 13:30:39.519
*** SESSION ID:(379.1) 2015-01-27 13:30:39.519
*** CLIENT ID:() 2015-01-27 13:30:39.519
*** SERVICE NAME:(SYS$BACKGROUND) 2015-01-27 13:30:39.519
*** MODULE NAME:() 2015-01-27 13:30:39.519
*** ACTION NAME:() 2015-01-27 13:30:39.519

Process startup failed, error stack:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302: failure occurred at: skgpspawn3

*** 2015-01-27 13:32:50.138
Process startup failed, error stack:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302: failure occurred at: skgpspawn3

*** 2015-01-27 13:33:24.157
Process startup failed, error stack:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302: failure occurred at: skgpspawn3
~
===========================================================

CAUSE


Insufficient paging space defined for the system program using excessive amount of paging space.

SOLUTION

Increase the OS paging space.

For AIX, the next APAR is advised:

Fix pack for: IZ19670: CANNOT INCREASE PAGING SPACE UNDER LOAD APPLIES TO AIX 6100-01

Please note the specific patches below:
  5300-09 - use AIX APAR IZ19504
  6100-01 - use AIX APAR IZ19670
  6100-02 - use AIX APAR IZ20052

For more information, please visit:
https://www-304.ibm.com/support/docview.wss?uid=isg1IZ19670

ORA-19809 LIMIT EXCEEDED FOR RECOVERY FILES

We encounter this error when the archivelog destination (specified by DB_RECOVERY_FILE_DEST parameter ) is full.
Solution
1. When we have time and resource consider adding disks to the diskgroup upon which the archive log destination resides and then increase the parameter DB_RECOVERY_FILE_DEST_SIZE parameter.
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=XXXG SCOPE=BOTH;
2.If the above solution doesn't work, use rman to delete the archive log which have been backed up to make some space in the destination.
export ORACLE_SID=TESTDB
rman target /
RMAN> delete noprompt archivelog all completed before 'sysdate - 1';
The above command deletes archivelogs which have been completed 24 hours ago if you have archivelog backup in last 24 hours then you are good to go otherwise change the sysdate - to larger number of days.
3. Consider configuring rman archive log deletion and retention policies.