Monday, July 31, 2006

Installing APEX 2.2 on XE

As you might have noticed APEX 2.2 is available for download. On the download site nowhere is stated that is doesn’t work for on XE, but installing on XE fails directly. How to solve this?

This is due to the following lines in the upgrade procedure in the file apexins.sql:
declare
t_edition varchar2(30);
edition_is_xe exception;
begin
--select edition into t_edition from v$instance;
execute immediate 'select edition from v$instance' into t_edition;
if nvl(t_edition,'x') = 'XE'
then

dbms_output.put_line('---------------------------------');
dbms_output.put_line('- Ap Ex cant be installed in Express Edition.-');
dbms_output.put_line('-------------------------------------');
raise edition_is_xe;
end if;
exception
when edition_is_xe then raise;
when others then null; -- no edition column, not xe
end;
/
Once the lines are REM’med out the upgrade process runs fine. After finishing the other steps from the upgrade manual I can login, change and run previously defined applications. The main difference with the “lightweight” APEX installed with XE is that there are workspaces defined for every Apex-developer (with the same name).

At this point you are only missing access to the workspace INTERNAL using the ADMIN account. This is easily solved by creating a new admin account by logging in in SQLPLUS as FLOWS_020200 user (unlock the account first) and issue:
begin
wwv_flow_api.set_security_group_id(p_security_group_id=>10);
wwv_flow_fnd_user_api.create_fnd_user(
p_user_name => 'admin2',
p_email_address => 'myemail@mydomain.com',
p_web_password => 'admin2') ;
end;
/
commit;
Now we can administer APEX on XE with ADMIN2 as were it a “normal” APEX installation!
Post a Comment