Skip to Main Content

Oracle Database Discussions

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!

expdp fails export SYS.AUD$

chileme88Oct 12 2020

Hi I've a 19.7 rac database with 2 pdbs.
Every night I run a shell script that call expdp in both pdbs:
expdp C##DBABACKUP/*********@${PDB} dumpfile=${DUMPFILE}_%U.dmp logfile=${DUMPFILE}.log encryption_password=${PASSWORD} PARFILE=${PARFILE}
The content of ${PARFILE} is:
*************************************************************
full=Y \
EXCLUDE=SCHEMA:"LIKE 'STORICO'" \
directory=export \
parallel=4 \
compression=all \
encryption_algorithm=aes256 \
VERSION=19.0.0 \
LOGTIME=ALL \
**************************************************************

All the tables of the 2 pdbs are exported but not the AUD$ tables.
In both log I find:
10-OCT-20 04:51:32.830: ORA-31693: Table data object "SYS"."AUD$" failed to load/unload and is being skipped due to error:
ORA-00942: table or view does not exist

In both pdbs I changed the AUD$ tablespace with:
BEGIN DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
audit_trail_location_value => 'DBAAUDIT_BIGTBSDAT');
END;
/

What's wrong?

Comments

Frank Kulash
Answer

Hi, @francy77
In schema1 i granted
grant insert,update, delete on t_table_var to ico
Grant the SELECT privilege, as well as INSERT, UPDATE and DELETE.
It sounds like ico has the SELECT privilege only via a role. Roles don't count in AUTHID OWNER stored procedures; all the necessary privileges must be granted directly to the user, or to PUBLIC.
Also, does ico have the CREATE PROCEDURE system privilege?
EDIT: After reading @paulzip 's reply (below) I added AUTHID OWNER above.

Marked as Answer by francy77 · Feb 2 2021
Paulzip

You need the select privilege too,
Also, another thing to bear in mind, is the procedure defined with definer rights (permissions are based on who owns the procedure) or invoker rights (permissions are based on who is calling the procedure)?
The default is definer rights.
Example of invoker rights....

create or replace procedure update_par(pcod in varchar2) authid current_user is 
francy77

I don t know why but granting select was enought, as your suggestion there was a missing SELECT in the grant instruction, so I added it and it works;
The strange thing is that indeed without the select even the delete dos't worked;

1 - 3

Post Details

Added on Oct 12 2020
7 comments
1,463 views