Get ORDS version and make sure ORDS is Enabled:
Run the following command to idnetify ORDS version if installed :SELECT 'ORDS is ' || Version "Version of ORDS"
FROM Ords_Metadata.Ords_Schema_Version;
Creating URL Mapping to Database Connection
- Create USER: CREATE USER TREST IDENTIFIED BY trest;
- Grant DBA: GRANT DBA TO TREST;
- Create Table EMP (Id NUMBER, Name VARCHAR2(15));
- Map URL: C:\Program Files\Java\jdk1.8.0_152\bin>java -jar d:\oracle\ords\ords.war map-url --type base-path /api api
- Enable REST for TREST Schema
ENABLING REST For user TREST:
BEGIN
ORDS.ENABLE_SCHEMA(
p_enabled => TRUE,
p_schema => 'TREST',
p_url_mapping_type => 'BASE_PATH',
p_url_mapping_pattern => 'api',
p_auto_rest_auth => FALSE
);
COMMIT;
END;
NOW your REST services is ready and the URL is : http://localhost:8080/ords/trest/
No comments:
Post a Comment