Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

error ORA-01031 with dbms_errlog.create_error_log

jmarcFeb 25 2021

Hello
i work on database 19.3.
1)i have created 2 users USERA and USERB
CREATE USER USERA
IDENTIFIED BY "USERA"
DEFAULT TABLESPACE SCENARIORH10G
TEMPORARY TABLESPACE SCENARIORHTMP10G
ACCOUNT UNLOCK;

GRANT "CONNECT" TO "USERA";
grant create any table to "USERA";
grant drop any table to "USERA";
grant select any table to "USERA";
GRANT UNLIMITED TABLESPACE TO "USERA";

CREATE USER USERB
IDENTIFIED BY "USERB"
DEFAULT TABLESPACE SCENARIORH10G
TEMPORARY TABLESPACE SCENARIORHTMP10G
ACCOUNT UNLOCK;
GRANT "CONNECT" TO "USERB";

grant create any table to "USERB";
grant drop any table to "USERB";
grant select any table to "USERB";
GRANT UNLIMITED TABLESPACE TO "USERB";

2)i create a table on USERA
sqlplus USERA/USERA
CREATE TABLE USERA.CUSTOMERS( customer_name varchar2(50) , city varchar2(50));

  1. i i execute the following with the USERB
    sqlplus USERB/USERB

SQL> begin
dbms_errlog.create_error_log(dml_table_name => 'USERA.CUSTOMERS',err_log_table_owner=>'USERA');
end;
/ 2 3 4
begin
*
ERREUR a la ligne 1 :
ORA-01031: privileges insuffisants
ORA-06512: a "SYS.DBMS_ERRLOG", ligne 480
ORA-06512: a ligne 2

  1. if i connect with USERA ,
    ERR$_CUSTOMERS has been created
    SQL> select table_name from user_tables;

TABLE_NAME
--------------------------------------------------------------------------------
CUSTOMERS
ERR$_CUSTOMERS

regards
jm

This post has been answered by Paulzip on Feb 26 2021
Jump to Answer
Comments
Post Details
Added on Feb 25 2021
5 comments
377 views