My Oracle Support Banner

Datapatch failed with "ORA-28405: cannot grant secure role to a role" (Doc ID 2897946.1)

Last updated on APRIL 17, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 19.15.0.0.0 and later
Linux x86-64

Symptoms

Datapatch failing with error to grant role to package gsmadmin_internal.exchange

----------------------------------------------------------------------------------------------------
Patch 33806152 apply: WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33806152/24713297/33806152_apply_<ORACLE_SID>_2022Sep21_04_14_38.log (errors)
  -> Error at line 31713: script rdbms/admin/prvtgwm.sql
  - ORA-28405: cannot grant secure role to a role
  - ORA-06512: at line 7
  - ORA-06512: at line 2
  -> Error at line 32828: script rdbms/admin/prvtgwm.sql
  - ORA-01924: role 'DATAPUMP_IMP_FULL_DATABASE' not granted or does not exist
  -> Error at line 32835: script rdbms/admin/prvtgwm.sql
  - ORA-01924: role 'DATAPUMP_EXP_FULL_DATABASE' not granted or does not exist

----------------------------------------------------------------------------------------------------


 SQL> -- So that dbms_gsm_xdb can be called from GDSCTL.

SQL> -- xdbadmin will not be present for XDB Lite...
SQL> -- ignore error.
SQL> BEGIN
2 EXECUTE IMMEDIATE 'grant xdbadmin to gsmadmin_role';
3 EXCEPTION
4 WHEN others THEN
5 IF sqlcode = -1917 OR sqlcode = -1919 THEN NULL;
6 -- suppress error for non-existent role
7 ELSE raise;
8 END IF;
9 END;
10 /
BEGIN
*
ERROR at line 1:
ORA-28405: cannot grant secure role to a role
ORA-06512: at line 7
ORA-06512: at line 2

 

SQL> GRANT datapump_imp_full_database TO package gsmadmin_internal.exchange;

GRANT datapump_imp_full_database TO package gsmadmin_internal.exchange
*
ERROR at line 1:
ORA-01924: role 'DATAPUMP_IMP_FULL_DATABASE' not granted or does not exist

SQL> GRANT datapump_exp_full_database TO package gsmadmin_internal.exchange;
GRANT datapump_exp_full_database TO package gsmadmin_internal.exchange
*
ERROR at line 1:
ORA-01924: role 'DATAPUMP_EXP_FULL_DATABASE' not granted or does not exist 

 

 

Changes

There are known restriction on Password protected roles from 12c onward.

Restrictions on Granting System Privileges and Roles 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.