LTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK
重置密码
SQL>alter user apex_public_user identified by apex_public_user
7, 安装配置Oracle Rest Data Services(ORDS)
下载地址:http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/
index.html
下载完后, 解压指定好的安装目录。 解压完后, 你可以发现ORDS这个就是个war包
7.1 Disabling Oracle XML DB Protocol Server
?
SQL>EXEC DBMS_XDB.SETHTTPPORT(0);
SQL>
7.2 configure RESTful Services in Oracle Application Express
SQL>@apex_rest_config.sql
?
When configuring RESTful Services in OracleApplication Express, it creates two
new database accounts.
■ APEX_LISTENER - The account used to query RESTfulServices definitions
stored in Oracle Application Express.
■ APEX_REST_PUBLIC_USER - The account used whencalling RESTful Services
definitions stored in Oracle Application Express.
?
?
SQL>@apex_rest_config.sql
?
?
Entera password for the APEX_LISTENER user []
Entera password for the APEX_REST_PUBLIC_USER user []
?
...createAPEX_LISTENER user
...createAPEX_REST_PUBLIC_USER user
SQL>
SQL>
?
7.3 Granting Connect Privileges, 这一步是赋连接的权限给web 主机, 使它能能够与ORDS进行连接
?
SQL>
SQL>DECLARE
2 ACL_PATH VARCHAR2(4000);
3 BEGIN
4 --Look for the ACL currently assigned to '*' and give APEX_050000
5 --the "connect" privilege if APEX_050000 does not have the privilegeyet.
6 SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
7 WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
8 IFDBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000',
9 'connect') IS NULL THEN
10 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
11 'APEX_050000', TRUE, 'connect');
12 ENDIF;
13 EXCEPTION
14 --When no ACL has been assigned to '*'.
15 WHENNO_DATA_FOUND THEN
16 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
17 'ACLthat lets power users to connect to everywhere',
18 'APEX_050000', TRUE, 'connect');
19 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
20 END;
21 /
COMMIT;
SQL>SQL>
7.3 Configuring Oracle Application Express Images
?
Copy the contents ofthe
/images folder to
/webapps/i/.
Where:
–
is the directory location of the Oracle Application Expressdistribution.
–
is the folder where Apache Tomcat is installed.
7.4 Configuring Oracle REST Data Services
a, copyords.war from ordspackage to tomcat webapps directory.
b, configure REST DATA Services
cd ../
/webapps
?
drwxrwxrwx 14 oracleoinstall 4096 Mar 27 14:04 docs
drwxrwxrwx 7 oracle oinstall 4096 Mar 27 14:04 examples
drwxrwxrwx 5 oracle oinstall 4096 Mar 27 14:04 host-manager
drwxrwxrwx 33 oracleoinstall 40960 May 11 02:56 i
drwxrwxrwx 5 oracle oinstall 4096 Mar 27 14:04 manager
-rw-r--r-- 1 oracle oinstall 28491706 May 11 20:17ords.war
drwxrwxrwx 3 oracle oinstall 4096 Mar 27 14:04 ROOT
7.5 配置ORDS连接
?
[oracle@localhostwebapps]$ java -jar ords.war setup
Jun 09, 201512:26:03 AM oracle.dbtools.common.config.file.ConfigurationFolderlogConfigFolder
INFO: Usingconfiguration folder: /tmp/apex
Enter the name ofthe database server [localhost]:
Enter the databaselisten port [1521]:
Enter 1 to specifythe database service name, or 2 to specify the database SID [1]:2
Enter the databaseSID [xe]:yang01
Enter the databaseuser name [APEX_PUBLIC_USER]:apex_public_user
Enter the databasepassword for apex_public_user:
Confirm password:
Enter 1 to enterpasswords for the RESTful Services database users(APEX_LISTENER,APEX_REST_PU