Wednesday, December 25, 2013

ORA-00600: internal error code, arguments: [723], [248344], [248344], [memory leak]



Solution:

1. For few leaks size: Ignore this ORA-600 [723] as it is more of a housekeeping message and is not really a cause for concern.

OR

2. In order to avoid the ORA-00600[723] , you can set the 10262 event;
SEE: (Doc ID 39308.1) ORA-600 [723] "PGA memory leak"

As a workaround, use event 10262 to suppress the error check. Set event 10262 at a level greater than the size of the leaked memory, e.g.:

-- > your error message: ORA-00600: internal error code, arguments: [723], [248344], [248344], [memory leak], [], [], [], [] <<<<<< LEAK 248344 ... 250Ko.

SQL> connect / as sysdba
SQL> alter system set events '10262 trace name context forever, level 300000';

This prevents the leak being reported which is not serious and is only signalled on logging out the session before freeing the memory, and so no memory is wasted.

OR

3. Apply the latest Patchset 10G Release2 database version (102050) which is fixing this issue. 

Patch Link: https://updates.oracle.com/Orion/PatchDetails/process_form?patch_num=8202632

Tuesday, December 24, 2013

Troubleshooting ORA-600 [723] "PGA memory leak


PURPOSE: This article discusses the internal error "ORA-600 [723]", what it means and possible actions. The information here is only applicable to the versions listed and is provided only for guidance.

ERROR: ORA-600 [723] [a] [b]

VERSIONS: versions 6.0 to 11.1

DESCRIPTION: This is a memory leak in the Program Global Area (PGA) PGA is checked for Space leaks at logoff time and a leak was found. There is no data corruption with this error.

ARGUMENTS: Arg [a] Logoff PGA size in bytes Arg [b] "memory leak"

FUNCTIONALITY: MEMORY COMPONENT

IMPACT:
PROCESS FAILURE - but only during session delete so impact is minimal
NON CORRUPTIVE - No underlying data corruption.

SUGGESTIONS: Event 10262 can be set to safely ignore small memory leaks.

Set the following in init.ora for example to disable space leaks less than 4000 bytes

event = "10262 trace name context forever, level 4000"
and stop and restart the database. Repeated errors can be diagnosed further by sending the alert.log and trace files to Oracle Support Services.

Known Issues:

Bug# 6749617
See Note 6749617.8 OERI[723] of "Global Blockers" memory on disconnect
Fixed: 10.2.0.5

Bug# 5891737
See Note 5891737.8Dump (kcblsod) / OERI:723 / Memory leak in ASM/RAC
Fixed: 10.2.0.4, 11.1.0.6, 10.2.0.3.P17


Saturday, December 21, 2013

Table Fragmentation

http://www.orafaq.com/node/1936


"dbms_redefinition"

SQL> create table TABLE1 (
2 no number,
3 name varchar2(20) default 'NONE',
4 ddate date default SYSDATE);

Table created.

SQL> alter table table1 add constraint pk_no primary key(no);

Table altered.

SQL> begin
2 for x in 1..100000 loop
3 insert into table1 ( no , name, ddate)
4 values ( x , default, default);
5 end loop;
6 end;
7 /

PL/SQL procedure successfully completed.

SQL> create or replace trigger tri_table1
2 after insert on table1
3 begin
4 null;
5 end;
6 /

Trigger created.

SQL> select count(*) from table1;

COUNT(*)
----------
100000

SQL> delete table1 where rownum <= 50000;

50000 rows deleted.

SQL> commit;

Commit complete.

SQL> exec dbms_stats.gather_table_stats('SCOTT','TABLE1');

PL/SQL procedure successfully completed.

SQL> select table_name, round((blocks*8),2)||'kb' "size"
2 from user_tables
3 where table_name = 'TABLE1';

TABLE_NAME size
------------------------------ ------------------------------------------
TABLE1 2960kb

SQL> select table_name, round((num_rows*avg_row_len/1024),2)||'kb' "size"
2 from user_tables
3 where table_name = 'TABLE1';

TABLE_NAME size
------------------------------ ------------------------------------------
TABLE1 822.69kb


SQL> --Minimum Privs required "DBA" role or "SELECT" on dbms_redefinition pkg
SQL> --First check table is condidate for redefinition.
SQL>
SQL> exec sys.dbms_redefinition.can_redef_table('SCOTT',-
> 'TABLE1',-
> sys.dbms_redefinition.cons_use_pk);

PL/SQL procedure successfully completed.

SQL> --After verifying that the table can be redefined online, you manually crea
te an empty interim table (in the same schema as the table to be redefined)
SQL>
SQL> create table TABLE2 as select * from table1 WHERE 1 = 2;

Table created.

SQL> exec sys.dbms_redefinition.start_redef_table ( 'SCOTT',-
> 'TABLE1',-
> 'TABLE2');

PL/SQL procedure successfully completed.

SQL> --This procedure keeps the interim table synchronized with the original tab
le.
SQL>
SQL> exec sys.dbms_redefinition.sync_interim_table ('SCOTT',-
> 'TABLE1',-
> 'TABLE2');

PL/SQL procedure successfully completed.

SQL> --Create PRIMARY KEY on interim table(TABLE2)
SQL> alter table TABLE2
2 add constraint pk_no1 primary key (no);

Table altered.

SQL> create trigger tri_table2
2 after insert on table2
3 begin
4 null;
5 end;
6 /

Trigger created.

SQL> --Disable foreign key on original table if exists before finish this proces
s.
SQL>
SQL> exec sys.dbms_redefinition.finish_redef_table ( 'SCOTT',-
> 'TABLE1',-
> 'TABLE2');

PL/SQL procedure successfully completed.

SQL> exec dbms_stats.gather_table_stats('SCOTT','TABLE1');

PL/SQL procedure successfully completed.

SQL> select table_name, round((blocks*8),2)||'kb' "size"
2 from user_tables
3 where table_name = 'TABLE1';

TABLE_NAME size
------------------------------ ------------------------------------------
TABLE1 1376kb

SQL> select table_name, round((num_rows*avg_row_len/1024),2)||'kb' "size"
2 from user_tables
3 where table_name = 'TABLE1';

TABLE_NAME size
------------------------------ ------------------------------------------
TABLE1 841.4kb

SQL> select status,constraint_name
2 from user_constraints
3 where table_name = 'TABLE1';

STATUS CONSTRAINT_NAME
-------- ------------------------------
ENABLED PK_NO1

SQL> select status ,trigger_name
2 from user_triggers
3 where table_name = 'TABLE1';

STATUS TRIGGER_NAME
-------- ------------------------------
ENABLED TRI_TABLE2

SQL> drop table TABLE2 PURGE;

Table dropped.