Tuesday, March 19, 2013

MODIFYING THE STORAGE FOR LOB SEGMENTS


This morning i got an alarm for a lob segment which was reaching its max extents , i checked for the available free space in the tablespace where the lob segment was available  , the tablespace was filled by only 50%.
So the next solution was to modify/increase the MAX EXTENTS storage clause for the lob segment .

Here is how i did it .

1) CHECKING THE LOB SEGMENT DETAILS  : 


select tablespace_name,segment_type,max_extents,next_extent,extents from dba_segments where segment_name='SYS_LOB0000007907C00009$$';

2) IDENTIFYING THE TABLE NAME AND COLUMN NAME : 


select owner||'.'||table_name "TABLE", column_name, segment_name from all_lobs where segment_name='SYS_LOB0000007907C00009$$';

3) MODIFYING THE STORAGE CLAUSE:


alter table owner.tablename modify lob (COLUM_NAME) (storage (maxextents unlimited ) );

Monday, March 11, 2013

IMP-00037: Character set marker unknown

                   IMP-00037: Character set marker unknown


Today while i was doing a migration from a 9i database 11g R2 database i received the error  IMP-00037 : Character Set marker unknown and the import terminated .

Here is how i rectified the issue .

SOURCE BOX : AIX 

TARGET BOX : Linux 

This issue usually arises  when the dump is corrupted .

In my case the it wasn't the corruption. 

To reduce the file size the dump file is compressed by the Unix COMPRESS utility .

In the Linux server (target) i did not un-compress  it , so the import failed . 

To resolve this i used the GUNZIP Linux utility and the re-imported the data and it completed successfully .


Thursday, February 28, 2013

HOW TO FIND IF A DATABASE IS A RAC DATABASE OR A STANDALONE DATABASE


USING PARAMETERS :


SQL> show parameter CLUSTER_DATABASE;

NAME                                 TYPE        VALUE
               
cluster_database                     boolean     TRUE
cluster_database_instances           integer     2


Or  you can check in parameter file from $ORACLE_HOME/dbs

*.cluster_database=TRUE

If  the value for cluster_database is  "TRUE"  the it means that the node is RAC enabled.

OR

SQL> select name, value from v$parameter where name=’cluster_database’;

NAME VALUE
——————— ———————
cluster_database TRUE

OR

USING PL/SQL PACKAGE


set serveroutput on
BEGIN
IF dbms_utility.is_cluster_database THEN
dbms_output.put_line(‘Running in SHARED/RAC mode.’);
ELSE
dbms_output.put_line(‘Running in EXCLUSIVE mode.’);
END IF;
END;
/

Running in SHARED/RAC mode.
PL/SQL procedure successfully completed.

You can tell how many instances are active by:-


SQL> select * from v$active_instances;

INST_NUMBER   INST_NAME

  1             Stage1
  2             Stage2