ubuntu@ubuntu:~/ORDS$ cat /home/ubuntu/ORDS/logs/ords_install_2024-03-08_084155_16516.log ------------------------------------------------------------ Date : 08 Mar 2024 08:41:55 Release : Oracle REST Data Services 23.4.0.r3461619 Type : ORDS Install Database : Oracle Database 19c Standard Edition 2 DB Version : 19.22.0.0.0 ------------------------------------------------------------ Container Name: NON_CDB Executing scripts for core ------------------------------------------------------------ [*** script: ords_prereq_env.sql] INFO: Checking prerequisites for Oracle REST Data Services PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. INFO: Prerequisites verified. [*** script: ords_verify_tablespace.sql] PL/SQL procedure successfully completed. [*** script: ords_alter_session_script.sql] PL/SQL procedure successfully completed. [*** script: ords_create_rest_users.sql] PL/SQL procedure successfully completed. [*** script: ords_alter_session_script.sql] PL/SQL procedure successfully completed. [*** script: ords_create_schema.sql] INFO: Creating schema for Oracle REST Data Services PL/SQL procedure successfully completed. INFO: Created schema ORDS_METADATA [*** script: ords_grant_privs.sql] INFO: Grant object and system privileges to ORDS owner GRANT EXECUTE ON SYS.DBMS_NETWORK_ACL_ADMIN TO "ORDS_METADATA" GRANT READ ON SYS.DBA_OBJECTS TO "ORDS_METADATA" GRANT READ ON SYS.DBA_ROLE_PRIVS TO "ORDS_METADATA" GRANT READ ON SYS.DBA_TAB_COLUMNS TO "ORDS_METADATA" GRANT READ ON SYS.DBA_USERS TO "ORDS_METADATA" GRANT READ ON SYS.DBA_NETWORK_ACL_PRIVILEGES TO "ORDS_METADATA" Error starting at line : 42 in command - declare type table_name_list is table of dba_tab_privs.table_name%TYPE; public_pkg_list table_name_list := table_name_list( 'DBMS_ASSERT', 'DBMS_LOB', 'DBMS_OUTPUT', 'DBMS_SCHEDULER', 'DBMS_SQL', 'DBMS_SESSION', 'DBMS_UTILITY', 'DEFAULT_JOB_CLASS', 'HTP', 'OWA', 'WPG_DOCLOAD', 'UTL_SMTP', 'DBMS_NETWORK_ACL_ADMIN' ); public_view_list table_name_list := table_name_list( 'SESSION_PRIVS' ); dba_view_list table_name_list := table_name_list( 'DBA_OBJECTS', 'DBA_ROLE_PRIVS', 'DBA_TAB_COLUMNS', 'DBA_USERS', 'DBA_NETWORK_ACL_PRIVILEGES', 'DBA_NETWORK_ACLS' ); dba_view_list_optional table_name_list := table_name_list( 'DBA_REGISTRY' ); c_public constant dba_tab_privs.grantee%TYPE := 'PUBLIC'; c_owner constant dba_tab_privs.owner%TYPE := 'SYS'; c_execute_priv constant dba_tab_privs.privilege%TYPE := 'EXECUTE'; c_select_priv constant dba_tab_privs.privilege%TYPE := 'SELECT'; c_read_priv constant dba_tab_privs.privilege%TYPE := 'READ'; c_grant constant varchar2(100) := 'GRANT '; c_on_sys constant varchar2(100) := ' ON SYS.'; c_grant_execute constant varchar2(100):= c_grant || c_execute_priv || c_on_sys; c_grant_select constant varchar2(100) := c_grant || c_select_priv || c_on_sys; c_grant_read constant varchar2(100) := c_grant || c_read_priv || c_on_sys; c_to_user constant varchar2(100) := ' TO ' || dbms_assert.enquote_name('ORDS_METADATA'); l_exists pls_integer := 0; l_use_read boolean := TRUE; not_authorized EXCEPTION; PRAGMA EXCEPTION_INIT(not_authorized, -01031); begin -- Check if the PUBLIC privileges exist to execute the packages for i in public_pkg_list.first .. public_pkg_list.last loop begin l_exists := 0; select count(*) into l_exists from dba_tab_privs where table_name = public_pkg_list(i) and privilege = c_execute_priv and grantee=c_public and owner=c_owner; if l_exists = 0 then sys.dbms_output.put_line(c_grant_execute || public_pkg_list(i) || c_to_user); execute immediate c_grant_execute || public_pkg_list(i) || c_to_user; end if; end; end loop; if sys.dbms_db_version.VERSION = 11 then l_use_read := FALSE; elsif sys.dbms_db_version.VERSION = 12 then select count(*) into l_exists from sys.dba_registry where COMP_ID='CATPROC' and VERSION like '12.1.0.1.%'; if l_exists > 0 then -- For Oracle DB 12.1.0.1, grant SELECT privilege. l_use_read := FALSE; end if; end if; -- Check if the PUBLIC privileges exist to read/select the view for i in public_view_list.first .. public_view_list.last loop begin l_exists := 0; select count(*) into l_exists from dba_tab_privs where table_name = public_view_list(i) and (privilege = c_read_priv or privilege = c_select_priv) and grantee=c_public and owner=c_owner; if l_exists = 0 then -- Grant privilege because the public read/select privilege is revoked. if l_use_read then -- 12.1.0.2 and later use the READ privilege sys.dbms_output.put_line(c_grant_read || public_view_list(i) || c_to_user); execute immediate c_grant_read || public_view_list(i) || c_to_user; else sys.dbms_output.put_line(c_grant_select || public_view_list(i) || c_to_user); execute immediate c_grant_select || public_view_list(i) || c_to_user; end if; end if; end; end loop; -- grant read or select on DBA views for i in dba_view_list.first .. dba_view_list.last loop if l_use_read then -- 12.1.0.2 and later use the READ privilege sys.dbms_output.put_line( c_grant_read || dba_view_list(i) || c_to_user); execute immediate c_grant_read || dba_view_list(i) || c_to_user; else sys.dbms_output.put_line(c_grant_select || dba_view_list(i) || c_to_user); execute immediate c_grant_select || dba_view_list(i) || c_to_user; end if; end loop; -- grant read or select on DBA views (optional) for i in dba_view_list_optional.first .. dba_view_list_optional.last loop begin if l_use_read then -- 12.1.0.2 and later use the READ privilege sys.dbms_output.put_line( c_grant_read || dba_view_list_optional(i) || c_to_user); execute immediate c_grant_read || dba_view_list_optional(i) || c_to_user; else sys.dbms_output.put_line(c_grant_select || dba_view_list_optional(i) || c_to_user); execute immediate c_grant_select || dba_view_list_optional(i) || c_to_user; end if; exception when not_authorized then sys.dbms_output.put_line( 'WARNING: SYS.' || dba_view_list_optional(i) || ' not authorized - use ords_installer_privileges.sql to update installer''s privileges.'); end; end loop; end; Error report - ORA-01031: insufficient privileges ORA-06512: at line 113 01031. 00000 - "insufficient privileges" *Document: YES *Cause: A database operation was attempted without the required privilege(s). *Action: Ask your database administrator or security administrator to grant you the required privilege(s). More Details : https://docs.oracle.com/error-help/db/ora-01031/ https://docs.oracle.com/error-help/db/ora-06512/