Monday, September 5, 2011

APEX notes

I'm starting my blog with what I'm working on at the moment.  Installing APEX for my friend Ricky.

Interesting enough, the pages I copied these directions from are written with Apex.  These directions will eventually work their way into connecting to an R12 E-Business Instance.

Oracle Application Express.

I have already  installed the 11.2.0.2 Database and Downloaded the Apex 4.0.1 zip file. http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html

Next.
 I'm following these installation directions:
http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html#installing

Required:

  • An Oracle Database version 10.2.0.3 or higher
  • Oracle XML DB needs to be installed and configured in the database

Steps: 

  1. Download the Application Express 4.1 distribution 
  2. Unzip the file
  3. Run the Application Express installation script, apexins.sql
  4. Configure your Web server
Installation Guide:

Detailed steps:


I created the tablespace apexd to use for my tablespace.  The directions use sysaux, but it looks to me that it's just an example.  I don't like to put anything into a system tablespace if i don't have to. 


 Create tablespace for your install
Login to the database as sys;



[oracle@r410 apex]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 5 22:49:06 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 


Create the APEXD tablespace for the APEX objects.


create tablespace apexd
datafile '/u08/oradata/APX/apex01.dbf'
size 1024M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO



1, Run the script apexins.sql


@apexins tablespace_apex tablespace_files tablespace_temp images

sql> @apexins apexd apexd TEMP /i/

or as per Oracles example;

@apexins SYSAUX SYSAUX TEMP /i/


2. Change the Password for the ADMIN Account



[oracle@r410 apex]$ sqlplus / nolog

SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected.
https://forums.oracle.com/forums/thread.jspa?threadID=351211

Or as I do it: 

[oracle@r410 apex]$ sqlplus / as sysdba


SQL> @apxchpwd
Enter a value below for the password for the Application Express ADMIN user.

Enter a password for the ADMIN user              []
Session altered.
...changing password for ADMIN
PL/SQL procedure successfully completed.Commit complete.

3. Restart Processes

After you install Oracle Application Express, you must restart the processes that you stopped before you began the installation, such as a listener and other processes. In addition, restart Oracle HTTP Server.

I have no idea what these processes are yet. 


Let's try this:


4. Configure the Embedded PL/SQL Gateway
To run the apex_epg_config.sql configuration script:
  1. Change your working directory to the apex directory where you unzipped the Oracle Application Express software.
  2. Start SQL*Plus and connect to the database

    Run apex_epg_config.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped 

SQL> !pwd
/data/patches/apex/apex

SQL> @apex_epg_config /data/patches/apex/apex


PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.Directory created.

declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.XMLTYPE", line 296
ORA-06512: at line 18

Commit complete.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

timing for: Load Images
Elapsed: 00:00:05.29

Session altered.

PL/SQL procedure successfully completed.

Commit complete.

Session altered.

Directory dropped.

 6. unlock the ANONYMOUS account: Run apxldimg.sql passing the file system path to the base directory where the Oracle Application Express software was unzipped as shown in the following example:


SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;

7. Verify the Oracle XML DB HTTP Server Port
SQL> SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;

GETHTTPPORT
-----------
       8080


To access your APEX instance


http://hostname:port/apex/apex_admin






The flies in the apex directory after unzipping :apex_4.1.zip 

total 324
-r--r--r--  1 oracle dba     44 Apr 26  2007 apxsqler.sql
-r--r--r--  1 oracle dba    690 Sep 10  2008 apex_epg_config.sql
-r--r--r--  1 oracle dba   8255 Apr 16  2010 apxldimg.sql
-r--r--r--  1 oracle dba  16068 Apr 16  2010 apex_epg_config_core.sql
-r--r--r--  1 oracle dba   1451 May  3 17:33 load_trans.sql
-r--r--r--  1 oracle dba   1647 May  3 17:33 apxxepwd.sql
-r--r--r--  1 oracle dba   9030 May  3 17:33 apxxemig.sql
-r--r--r--  1 oracle dba   4852 May  3 17:33 apxremov.sql
-r--r--r--  1 oracle dba   2986 May  3 17:33 apxconf.sql
-r--r--r--  1 oracle dba  13889 Jun 17 12:08 apexvalidate.sql
-r--r--r--  1 oracle dba   2401 Aug  9 06:27 endins.sql
-r--r--r--  1 oracle dba  13070 Aug  9 06:27 devins.sql
-r--r--r--  1 oracle dba 103885 Aug  9 06:27 coreins.sql
-r--r--r--  1 oracle dba   4481 Aug  9 06:27 apxrtins.sql
-r--r--r--  1 oracle dba   3252 Aug  9 06:27 apxdvins.sql
-r--r--r--  1 oracle dba  11032 Aug  9 06:27 apxdevrm.sql
-r--r--r--  1 oracle dba   1706 Aug  9 06:27 apxchpwd.sql
-r--r--r--  1 oracle dba   6586 Aug  9 06:27 apexins.sql
drwxr-xr-x  4 oracle dba   4096 Aug 23 15:33 utilities
drwxr-xr-x 11 oracle dba   4096 Aug 23 15:33 builder
drwxr-xr-x 25 oracle dba  36864 Aug 23 15:33 images
drwxr-xr-x  2 oracle dba  28672 Aug 23 15:33 core
drwxr-xr-x  2 oracle dba   4096 Aug 23 16:01 owa

No comments:

Post a Comment