ORA-1403 when Revoking Default Grant of INHERIT PRIVILEGES on XDB and ANONYMOUS (Doc ID 2289675.1)

Last updated on JULY 24, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.2.0.1 [Release 12.1 to 12.2]
Information in this document applies to any platform.

Symptoms

The upgrade of XDB from 11.2.0.4 to 12.2.0.1 using DBUA failed with the following error:

ORA-01403: no data found
ORA-06512: at line 11
ORA-06512: at line 23

Statement that failed:

10:01:05 SQL> -- Revoke the default grant of INHERIT PRIVILEGES on XDB and ANONYMOUS
10:01:05 SQL> -- from public.
10:01:05 SQL>
10:01:05 SQL> declare
10:01:05 2 already_revoked exception;
10:01:05 3 pragma exception_init(already_revoked,-01927);
10:01:05 4
10:01:05 5 procedure revoke_inherit_privileges(user in varchar2) as
10:01:05 6 sql_stmt varchar2(4000);
10:01:05 7 usr_exists number := 0;
10:01:05 8 begin
10:01:05 9
10:01:05 10 sql_stmt := 'select 1 from user$ where name = upper(:1)';
10:01:05 11 execute immediate sql_stmt into usr_exists using user;
10:01:05 12
10:01:05 13 if (usr_exists = 1) then
10:01:05 14 execute immediate 'revoke inherit privileges on user '||
10:01:05 15 dbms_assert.enquote_name(user)||' from public';
10:01:05 16 end if;
10:01:05 17 exception
10:01:05 18 when already_revoked then null;
10:01:05 19 end;
10:01:05 20
10:01:05 21 begin
10:01:05 22 revoke_inherit_privileges('xdb');
10:01:05 23 revoke_inherit_privileges('anonymous');
10:01:05 24 end;
10:01:05 25 /

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms