PROBLEM:

While creating a staging table in oracle database for SYS user, for storing baseline, got below error.(ORA-19381)

SQL> show user
USER is "SYS"
BEGIN
 DBMS_SPM.CREATE_STGTAB_BASELINE(
 table_name => 'spm_stageing_tab',
 tablespace_name => 'USERS');
END;
/
   2    3    4    5    6  BEGIN
*
ERROR at line 1:
ORA-19381: cannot create staging table in SYS schema
ORA-06512: at "SYS.DBMS_SMB", line 350
ORA-06512: at "SYS.DBMS_SPM", line 2172
ORA-06512: at line 2

SOLUTION:

Staging tables can’t be created under SYS user. So try to create the staging table from other USERS.

 

oerr ora 19381
19381, 00000, “cannot create staging table in SYS schema”
// *Cause: The user attempted to create a staging table in the sys schema
// *Action: Create the table in another schema.

SQL> connect dbaclass
Enter password:
Connected.

SQL> show user
USER is "DBACLASS"

SQL> BEGIN
 DBMS_SPM.CREATE_STGTAB_BASELINE(
 table_name => 'spm_stageing_tab',
 tablespace_name => 'USERS');
END;
/
   2    3    4    5    6
PL/SQL procedure successfully completed.