登录系统:sqlplus system/0621
1. 从数据字典v$instance中获取数据库的实例名和版本号:
SQL> conn system/Oracle
Connected.
SQL> show user;
USER is "SYSTEM"
SQL> select instance_name,version from v$instance;
INSTANCE_NAME VERSION
---------------- -----------------
ORCL 11.1.0.6.0
2. 从数据字典v$version中获取版本的详细信息:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 – Production
3.确认oracle所使用的参数文件是否为二进制的参数文件(spfile表明为二进制文件):
SQL> show parameter pfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/oracle/dbs/spfileORCL.ora
4. 确认oracle是否使用的是自动内存管理:
SQL> show parameter memory_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 396M
5. 查看表空间是否为自动扩展:
SQL> select tablespace_name, autoextensible from dba_data_files;
TABLESPACE_NAME AUT
------------------------------ ---
USERS YES
UNDOTBS1 YES
SYSAUX YES
SYSTEM YES
EXAMPLE YES
PEIHU NO
PEIHU YES
7 rows selected.
嵌入式PL/SQL网关配置
使用嵌入式PL/SQL网关(也称连接器,Gateway)安装和配置Oracle Application Express的具体步骤如下:
1. 安装Oracle Application Express.
1.1先进入到APEX的解压根目录
我的目录是/u01/apex(这个一定要做,否则等下无法正确安装)
[oracle@oracle11g ~]$ cd /u01/apex
[oracle@oracle11g apex]$ ls
apex_epg_config_core.sql apxe111.sql core
apex_epg_config.sql apxldimg.sql coreins.sql
apexins.sql apxpatch.sql devins.sql
apexvalidate.sql apxrelod.sql doc
apxchpwd.sql apxremov.sql endins.sql
apxconf.sql apxrtins.sql images
apxdbmig.sql apxsqler.sql install2011-03-14_01-45-58.log
apxdevrm.sql apxxemig.sql load_trans.sql
apxdvins.sql apxxepwd.sql owa
apxe101.sql builder utilities
apxe102.sql catapx.sql
1.2然后用SYS身份登陆
SQL> conn / as sysdba
Connected.
SQL> show user
USER is "SYS"
1.3安装脚本
SQL> @apexins SYSAUX SYSAUX TEMP /i/
其中:apexins为安装脚本文件名称
SYSAUX SYSAUX 第一个SYSAUX为数据存放的表空间,第二个为用户信息存放表空间
TEMP为排序所用的表空间
/i/表示EXPRESS中存放的虚拟目录
1.4检查是否安装完毕
SQL> select username,created from dba_users
2 where username like 'APEX%';
USERNAME CREATED
------------------------------ ---------
APEX_030200 14-MAR-11
APEX_PUBLIC_USER 03-AUG-07
SQL> select username,created from dba_users where username like 'FLOW%';
USERNAME CREATED
------------------------------ ---------
FLOWS_FILES 03-AUG-07
FLOWS_030000 03-AUG-07
2. 修改Admin帐户密码
SQL> @apxchpwd
Enter a value below for the password for the Application Express ADMIN user.
Enter a password for the ADMIN user []
输入你的密码:oracle
Session altered.
...changing password for ADMIN
PL/SQL procedure successfully completed.
Commit complete.
3. 配置嵌入式PL/SQL网关。
SQL> @apex_epg_config /u01/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:03.68
Session altered.
PL/SQL procedure successfully completed.
Commit complete.
Session altered.
Directory dropped.
错误原因是目录不对。解决办法:
改 /tmp 为你解压apex后所在的目录,例如我的是:/u01/apex,那么/tmp为/u01
文档做了注释,但地方不对,在@apxldimg.sql是有如下说明:
引用
Tip:
The above examples assume that you unzipped Oracle Application Express in a directory called TEMP on Windows and tmp on UNIX or Linux.
纠正后如下:
SQL> @apex_epg_config /u01
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Directory created.
PL/SQL procedure successfully completed.
Commit complete.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
timing for: Load Images
Elapsed: 00:01:45.40
Session altered.
PL/SQL procedure successfully completed.
Commit complete.
Session altered.
Directory dropped.