Monday, September 19, 2016

ORA-00600: internal error code, arguments: [13013], Table/Index row count mismatch ; SQL error 600 occurred when updating duplicate row in table.

My Oracle 11.2.0.4 database started reporting Ora-600 errors

Upon checking the alert log and Oracle Support (Doc ID 1438920.1) , 

Turns out the Index was corrupted.. Ran the Analyze table command to analyze the problem table

SQL> analyze table APP_USER.ENTRY_HIT VALIDATE STRUCTURE CASCADE;
analyze table APP_USER.ENTRY_HIT VALIDATE STRUCTURE CASCADE
*
ERROR at line 1:
ORA-01499: table/index cross reference failure - see trace file

Trace file shows below

Table/Index row count mismatch
table 384001 : index 384028, 0
Index root = tsn: 7 rdba: 0x02400a5a

The error says the indexes are still bad.

If you run the query through SQL*PLUS it will ask for a rdba number. Enter the value from error message '0x02400a5a' (no quotes). This will return a file number and a block number.

SQL> SELECT dbms_utility.data_block_address_file(
  2           to_number(trim(leading '0' from
  3  replace('&&rdba','0x','')),'XXXXXXXX')
  4         ) AS rfile#,
  5         dbms_utility.data_block_address_block(
         to_number(trim(leading '0' from
  6    7  replace('&&rdba','0x','')),'XXXXXXXX')
  8         ) AS block#
  9  FROM dual;
Enter value for rdba: 0x02400a5a
old   3: replace('&&rdba','0x','')),'XXXXXXXX')
new   3: replace('0x02400a5a','0x','')),'XXXXXXXX')
old   7: replace('&&rdba','0x','')),'XXXXXXXX')
new   7: replace('0x02400a5a','0x','')),'XXXXXXXX')

    RFILE#     BLOCK#
---------- ----------
         9       2650

Next run the following query:

select owner, segment_name, segment_type 
from  dba_segments 
where header_file = <rfile#>
  and header_block = <block#>;

This will give you the offending index to be dropped and recreated.


Wednesday, September 7, 2016

ORA-00245: control file backup failed; target is likely on a local file system

Error : ORA-00245: control file backup failed; target is likely on a local file system

Cause : the control file is saved on local file system., in case of RAC databases the control file snapshot should be saved on the shared location.

Solution : Make change in RMAN to point the control file snapshot to be saved under shared location

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DB4_ORADATA/snapcf_db4.f';

ORA-00234,ORA-17503,ORA-15045

RMAN> SHOW SNAPSHOT CONTROLFILE NAME; 

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 09/07/2016 08:41:04
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 09/07/2016 08:41:04
ORA-00234: error in identifying or opening snapshot or copy control file
ORA-00202: control file: '+DB4_ORADATA'
ORA-17503: ksfdopn:2 Failed to open file +DB4_ORADATA
ORA-15045: ASM file name '+DB4_ORADATA' is not in reference form

Everything I run on the catalog database gives me the above error

Solution :

Make the change as sys user

SQL> EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME ('+DB4_ORADATA/snapcf_db4.f');

PL/SQL procedure successfully completed.

this resolved the rman issue.. 

Thursday, September 1, 2016

"E575: viminfo: Illegal starting char in line:" while opening a file on Linux

Error:
E575: viminfo: Illegal starting char in line: 2015-04-03 12:35:01:64263:1428089701:1428089701:0:ok
E575: viminfo: Illegal starting char in line: 2015-04-03 12:36:01:44948:cronmon.ksh starting as pid 44948 with threshold of 120 seconds.

Reason : 
viminfo file got corrupted

Solution :
viminfo file is present in the user home location, as its hidden file it starts with .viminfo. The solution for this error is deleting this .viminfo file or rename it. This file will get generated again once you open a file.