前提条件是:
1. Oracle Database 11g R2 database 已经安装。
2.Oracle Application Express 已经安装。
我们可以使用下面两个步骤建立ILM_ADMIN用户。
Sqlplus / as sysdba
Create user ilm_admin identified by ilm_admin default tablespace ILM;
SQL> @grant_privs ilm_admin
Session altered.
Session altered.
old 1: GRANT MANAGE TABLESPACE TO &ilm_user
new 1: GRANT MANAGE TABLESPACE TO ilm_admin
Grant succeeded.
old 1: GRANT ALTER TABLESPACE TO &ilm_user
new 1: GRANT ALTER TABLESPACE TO ilm_admin
Grant succeeded.
old 1: GRANT ALTER ANY TABLE TO &ilm_user
new 1: GRANT ALTER ANY TABLE TO ilm_admin
Grant succeeded.
old 1: GRANT DROP ANY TABLE TO &ilm_user
new 1: GRANT DROP ANY TABLE TO ilm_admin
Grant succeeded.
PL/SQL procedure successfully completed.
old 1: GRANT ADVISOR TO &ilm_user
new 1: GRANT ADVISOR TO ilm_admin
Grant succeeded.
old 1: GRANT ALTER ANY TABLE TO &ilm_user
new 1: GRANT ALTER ANY TABLE TO ilm_admin
Grant succeeded.
old 1: GRANT DROP ANY TABLE TO &ilm_user
new 1: GRANT DROP ANY TABLE TO ilm_admin
Grant succeeded.
old 1: GRANT MANAGE TABLESPACE TO &ilm_user
new 1: GRANT MANAGE TABLESPACE TO ilm_admin
Grant succeeded.
old 1: GRANT ALTER TABLESPACE TO &ilm_user
new 1: GRANT ALTER TABLESPACE TO ilm_admin
Grant succeeded.
old 1: GRANT EXECUTE ON ILM_TOOLKIT.ILM_TOOLKIT TO &ilm_user
new 1: GRANT EXECUTE ON ILM_TOOLKIT.ILM_TOOLKIT TO ilm_admin
Grant succeeded.
Creating the ILM$$USER package for Immutability features...
old 2: l_username varchar2(30) := '&ilm_user';
new 2: l_username varchar2(30) := 'ilm_admin';
declare
*
ERROR at line 1:
ORA-01435: user does not exist
ORA-06512: at line 51
--- 注意这个地方。用户名要大写。
SQL> @grant_privs ILM_ADMIN
Session altered.
Session altered.
old 1: GRANT MANAGE TABLESPACE TO &ilm_user
new 1: GRANT MANAGE TABLESPACE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT ALTER TABLESPACE TO &ilm_user
new 1: GRANT ALTER TABLESPACE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT ALTER ANY TABLE TO &ilm_user
new 1: GRANT ALTER ANY TABLE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT DROP ANY TABLE TO &ilm_user
new 1: GRANT DROP ANY TABLE TO ILM_ADMIN
Grant succeeded.
PL/SQL procedure successfully completed.
old 1: GRANT ADVISOR TO &ilm_user
new 1: GRANT ADVISOR TO ILM_ADMIN
Grant succeeded.
old 1: GRANT ALTER ANY TABLE TO &ilm_user
new 1: GRANT ALTER ANY TABLE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT DROP ANY TABLE TO &ilm_user
new 1: GRANT DROP ANY TABLE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT MANAGE TABLESPACE TO &ilm_user
new 1: GRANT MANAGE TABLESPACE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT ALTER TABLESPACE TO &ilm_user
new 1: GRANT ALTER TABLESPACE TO ILM_ADMIN
Grant succeeded.
old 1: GRANT EXECUTE ON ILM_TOOLKIT.ILM_TOOLKIT TO &ilm_user
new 1: GRANT EXECUTE ON ILM_TOOLKIT.ILM_TOOLKIT TO ILM_ADMIN
Grant succeeded.
Creating the ILM$$USER package for Immutability features...
old 2: l_username varchar2(30) := '&ilm_user';
new 2: l_username varchar2(30) := 'ILM_ADMIN';
PL/SQL procedure successfully completed.
测试:使用ilm_admin用户登录系统。
在浏览器中输入下列地址:
http://localhost:8081/apex/f?p=737677
输入ilm_admin和密码:
正确的话应该返回如下界面: