Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1117963
  • 博文数量: 231
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-03 16:35
个人简介

学无止境

文章分类

全部博文(231)

文章存档

2014年(7)

2013年(103)

2011年(11)

2010年(53)

2009年(57)

分类: Oracle

2011-02-10 10:57:10

Easy Steps to Install/ Upgrade/ Migrate/ Uninstall APEX - Example 3.1.2 [ID 761836.1]

  修改时间 28-JAN-2011     类型 HOWTO     状态 PUBLISHED  

In this Document
  
  
  


Applies to:

Oracle Application Express (formerly HTML DB) - Version: 1.5 and later   [Release: 1.5.0 and later ]
Information in this document applies to any platform.

Goal

Easy steps to install /  upgrade / uninstall Application Express (APEX). While this document discusses version 3.1.2, the concepts apply to all versions of Application Express / HTML DB.

  

Solution

Install / Upgrade APEX :

1. Go to http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html. This site has the most current version of Application Express.

For earlier versions of Application Express and the installation guide, click on the Prior Release Archive link on the APEX OTN download page. 

  • Click Accept License Agreement
  • Oracle Application Express 3.1.2 Download (Click this link in that page).
  • The above is "Full download" of 3.1.2 in which it can be installed if apex is installed newly or it can be upgraded on top of lower versions below 3.1(versions lesser or above 2.1 but below 3.1).
    If you are upgrading and the first two digits of the version number are the same, you will need to download the upgrade patch, instead of the full download. For example, 3.1 is currently installed and you wish to upgrade to 3.1.2,  is needed.


2. Extract the zip file in a folder.
3. Ensure the database is up.
4. Install Application Express into the database. It is assumed the download / patch files have been unzipped into D:\Downloads\Apex\apex3.1.2:

  • Go to the command prompt and to the path where the zip file is downloaded. Log in  as the SYS user via SQLPLUS which will be in the database ORACLE_HOME\bin directory.
    For example:

D:\Downloads\Apex\apex3.1.2\apex > D:\oracle\product\10.2.0\db_10g\BIN\sqlplus
You will get SQL prompt as :

SQL> sys as sysdba
password: (your sys password)


Execute the apexins.sql file which will install / upgrade your Application Express. 

SQL> @apexins SYSAUX SYSAUX TEMP /i/

 

Where the parameters represent the following:

Parameter 1(SYSAUX): tablespace_apex is the name of the tablespace for the Oracle Application Express application user.
Parameter 2(SYSAUX): tablespace_files is the name of the tablespace for the Oracle Application Express files user.
Parameter 3(TEMP): tablespace_temp is the name of the temporary tablespace.
Parameter 4(/i/): images is the virtual directory for Oracle Application Express images. To support future Oracle Application Express upgrades, define the virtual image directory as /i/.

Note that earlier versions of APEX may use a different command syntax. Check the installation guide for your version.

When Oracle Application Express installs it creates three new database accounts:

FLOWS_030100 - The account that owns the Oracle Application Express schema and metadata.
FLOWS_FILES - The account that owns the Oracle Application Express uploaded files.
APEX_PUBLIC_USER - The minimally privileged account used for Oracle Application Express configuration with Oracle HTTP Server and mod_plsql.

If APEX is being upgraded from a previous release, FLOWS_FILES will already exist and APEX_PUBLIC_USER will be created if it is not there already.

In case of version 3.2 and above, the FLOWS_XXXXXX has been replaced with APEX_ XXXXXX:

APEX_030200 - The account that owns the Oracle Application Express schema and metadata.

It is also possible to revert back to the previous installation when an upgrade fails. For example:
APEX Ugrade Installation Corrupted by Using Incorrect Paramaters for Install Script

5. Configuring HTTP server for Image Alias:

     After a successful install / upgrade, the images folder contained in the downloaded zip file should be copied into location defined in the existing DAD. If a DAD has not been defined, you will need to create the DAD according to the instructions in the Application Express installation guide for the version you wish to install.

  • Determine the location of the /i/ alias containing the APEX images, by finding the definition in the dads.conf file (ealier versions may have this definition in the marvel.conf file). The location of the DAD definition files is typically located in $HTTP_serverhome\Apache\modplsql\conf:
Alias /i/ "D:\oracle\product\10.2.0\httpserver/Apache/Apache/images/"
  • Back up the images directory for an upgrade installation. This is not required for a brand new installation.
  • Copy the images from the installation directory to the location defined in the DAD.
  • For editing the dads.conf file,goto URL 4.5.2.5.1 Editing the dads.conf File.
If your DAD is defined in marvel.conf, it is recommended that you move the DAD definition into dads.conf, which is the now the standard location for the Application Express DAD definition.

a. Configuring the Embedded PL/SQL Gateway

In a new installation, you configure the Embedded PL/SQL Gateway (EPG) by running the configuration script apex_epg_config.sql. Then, unlock the ANONYMOUS account.  

Note:  If you are upgrading and have previously configured the Embedded PL/SQL Gateway, skip this section and go to "Updating the Images Directory When Upgrading from Release 3.0".


To configure the embedded PL/SQL gateway:

1. Change your working directory to the APEX directory where you unzipped the Oracle Application Express software on the database server.

2. Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:

On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
connect sys as sysdba


On UNIX and Linux:
When prompted, enter the appropriate password.

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

On Windows:

$ sqlplus /nolog
connect sys as sysdba


SQL> @apex_epg_config /home/directory

On UNIX and Linux:
[/home/directory is the directory where apex was unpacked]. So, if the APEX is under /home/oracle/11.2.0/apex subdirectory the parameter used for the apex_epg_config script is  the directory: /home/oracle/11.2.0/]
 
Enter the following statement to unlock the ANONYMOUS account:

SQL> @apex_epg_config /home/directory


ALTER USER ANONYMOUS ACCOUNT UNLOCK; 


3. Run apxconf  [provide the ADMIN account and pwd]  to set the port.

And finally the listener should be taken down and up again (if possible the database too ) so the port is recognized and active.

b. Updating the Images Directory When Upgrading from Release 3.0

If you are upgrading Oracle Application Express from release 3.0, you must run the apxldimg.sql script to update the images directory.

To run the apxldimg.sql script:

Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role:

On Windows:

SYSTEM_DRIVE:\ sqlplus /nolog
connect sys as sysdba


On UNIX and Linux:

$ sqlplus /nolog
connect sys as sysdba
(When prompted, enter the appropriate password.)


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:

On Windows: This assumes the installation software images from the zip file are in in SYSTEM_DRIVE:\TEMP

On UNIX and Linux:

SQL> @apxldimg.sql SYSTEM_DRIVE:\TEMP

 

SQL> @apxldimg.sql /tmp

This assumes the installation software images from the zip file are in in /tmp/apex/images.

c.Configuration Information for Fusion Middleware 11.1.1 HTTP Server (if used) which comes with 11.2 database :

Due to the timing of the 11.2 database release, the configuration information for the Oracle Fusion Middleware 11.1.1 version of the Oracle HTTP Server could not be included.
The basic configuration details for the Web Tier are the same, however the location of the configuration files, log files and command syntax has changed.

Configuration file locations:

dads.conf  : ORACLE_INSTANCE/config/OHS/ohs1/mod_plsql
httpd.conf : ORACLE_INSTANCE/config/OHS/ohs1

Diagnostic file locations:

access_log ORACLE_INSTANCE/diagnostics/logs/OHS/ohs1
ohs1.log ORACLE_INSTANCE/diagnostics/logs/OHS/ohs1

(The ohs1.log equivalent of the error_log.nnnnnnnnn in 10.1.2.x versions of the OHS.)

To restart the OHS:

ORACLE_INSTANCE/bin/opmnctl stopproc ias-component=ohs1
ORACLE_INSTANCE/bin/opmnctl startproc ias-component=ohs1

OR

ORACLE_HOME/opnm/bin/opmnctl stopproc ias-component=ohs1
ORACLE_HOME/opnm/bin/opmnctl startproc ias-component=ohs1


See the Oracle Fusion Middleware Administrator's Guide for Oracle HTTP Server11g Release 1 (11.1.1) for more information on administration and configuration of the OHS.

 

This is also explained in Note.1070034.1

6. Execute the ApEx URL as :  for a standard HTTP Server installation or for an EPG installation.

This will bring up the workspace login screen of APEX. After logging in, you will be able to see the upgraded version of APEX in the lower right corner of the screen.

Note : Check the tablespace size before performing an upgrade or migration of Application Express.

Uninstall APEX :

Each of the APEX installation guides has instructions on now to recover from a failed installation or remove APEX from the database entirely.

  • The installation guide for the current version of APEX can be found here.
  • Installation guides for previous releases can be found here.

See How to Uninstall Oracle HTML DB / Application Express from the Database: for an example.


References

- APEX Installation Guide Is Missing Configuration Information for Fusion Middleware 11.1.1 OHS
- How to Uninstall Oracle HTML DB / Application Express from the Database?
- APEX Ugrade Installation Corrupted by Using Incorrect Parameters for Install Script
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

显示相关信息 相关的


产品
  • Middleware > Developer Tools > Database & PLSQL > Oracle Application Express (formerly HTML DB)
关键字
UPGRADE TO 3.1.2; MOD_PLSQL; INSTALLATION; UPGRADE; WORKSPACE; HTTP SERVER; UNINSTALL; AFTER UPGRADE

阅读(1976) | 评论(0) | 转发(0) |
0

上一篇:登录失败触发器

下一篇:FLOWS_FILES用户

给主人留下些什么吧!~~