Amazon books

Thursday, March 24, 2011

How to change Java Heap Size - Weblogic

If you are trying to deploy and are facing timeout on Weblogic, try to increse Java Heap Size.

Find and edit file setDomainEnv.sh (path example: /ora01/XXX/WEBLOGIC/BEA/user_projects/domains/xxx_domain/bin):

Add lines below:

USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
export USER_MEM_ARGS


Restart Weblogic:
stopWebLogic.sh
startWebLogic.sh

Test again!


Best Regards,
Paulo Portugal

Check whether Oracle Installation is 32bit or 64bit

Run the PL/SQL Block bellow to check which Oracle is installed:

################################################
set serveroutput on
declare
v_metadata varchar2(1000);
v_plataform varchar2(1000);
begin

select metadata into v_metadata from sys.kopm$;

select substr(lpad(v_metadata,112),109,4) into v_plataform from dual;

if v_plataform = 'B023' then
dbms_output.put_line(a => 'My Oracle installation is ----32bit----!');
else
dbms_output.put_line(a => 'My Oracle installation is ----64bit----!');
end if;

end;
/
################################################

Or just check oracle file in $ORACLE_HOME/bin:
--64 bit example
$ file oracle
oracle: setuid setgid ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

--32bit example:
$ file oracle
oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped



Best Regards,
Paulo Portugal

Wednesday, March 2, 2011

Change hostname | IP address of an APEX Server

If you need to change IP address or | and hostname of server that hosts Oracle Application Express just run the command below after changing IP and hostname:

begin

dbms_xdb.setlistenerendpoint(
endpoint => dbms_xdb.XDB_ENDPOINT_HTTP
, host => '10.10.10.18'
, port => 8080
, protocol => dbms_xdb.XDB_PROTOCOL_TCP);
end;
/


After that, access your Apex site like http://10.10.10.18:8080/apex/apex_admin

Best Regards,
Paulo Portugal