Pages

Sunday, May 12, 2013


DBCA error Java.lang.OutOfMemoryError: Java Heap Space" Error


We can increase the default 128m memory value in dbca file and start dbca again

Windows :
1. Navigate to ORACLE_HOME/BIN (Take a backup dbca.bat)
2. Find and edit file dbca.bat with the below 
"D:\Oracle_DB\product\11.2.0\dbhome_1\jdk\jre\BIN\JAVA" -DORACLE_HOME="%OH%" -Doracle.installer.not_bootstrap=true -DJDBC_PROTOCOL=thin -mx128m oracle.sysman.assistants.dbca.Dbca %*
3. Modify "-mx128m" value to a higher value like -mx512m

Linux:
1. cd $ORACLE_HOME/bin
2. ls -ltr dbca
3. vi dbca and edit the value -mx128m
JRE_OPTIONS="${JRE_OPTIONS} -DSET_LAF=${SET_LAF} -Dsun.java2d.font.DisableAlgorithmicStyles=true -Dice.pilots.html4.ignoreNonGenericFonts=true -DDISPLAY=${DISPLAY} -DJDBC_PROTOCOL=thin -mx128m"

Thursday, May 9, 2013


How to find a column has space:

There may be several other ways to find space in a column, this is another simple way

SQL> sho user
USER is "SYS"
SQL> conn a/a
Connected.
SQL> create table space (space varchar2(10));

Table created.

SQL> insert into space values ('test1');

1 row created.

SQL> insert into space values ('test2 ');

1 row created.

SQL> insert into space values ('test3  ');

1 row created.

SQL> insert into space values ('test4   ');

1 row created.

SQL> insert into space values ('test5    ');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from space;

SPACE
----------
test1
test2
test3
test4
test5

SQL> select length(space) from space;

LENGTH(SPACE)
-------------
            5
            6
            7
            8
            9

SQL> select space|| ';' from space;

SPACE||';'
-----------
test1;
test2 ;
test3  ;
test4   ;
test5    ;

SQL> select length(space) "length",space|| ';' value from space;

    length VALUE
---------- -----------
         5 test1;
         6 test2 ;
         7 test3  ;
         8 test4   ;
         9 test5    ;