i was trying to get some information from a stored video inoracle dba ,
while executiong this script :
DECLARE
vid_data BFILE := BFILENAME('EXT_DIR','video.mp4');
mimeType VARCHAR2(80);
format VARCHAR2(32) := NULL;
width NUMBER;
height NUMBER;
frameResolution NUMBER;
frameRate NUMBER;
videoDuration NUMBER;
numberOfFrames NUMBER;
compressionType VARCHAR2(160);
numberOfColors NUMBER;
bitRate NUMBER;
BEGIN
-- get properties from bfile
ORDSYS.ORD_VIDEO.getProperties(vid_data, mimeType, format,
width, height, frameResolution, frameRate,
videoDuration, numberOfFrames, compressionType,
numberOfColors, bitRate);
-- print properties
DBMS_OUTPUT.PUT_LINE('mimeType: ' || mimeType );
DBMS_OUTPUT.PUT_LINE('format: ' || format );
DBMS_OUTPUT.PUT_LINE('width: ' || width );
DBMS_OUTPUT.PUT_LINE('height: ' || height );
DBMS_OUTPUT.PUT_LINE('frameResolution: ' || frameResolution );
DBMS_OUTPUT.PUT_LINE('frameRate: ' || frameRate );
DBMS_OUTPUT.PUT_LINE('videoDuration: ' || videoDuration );
DBMS_OUTPUT.PUT_LINE('numberOfFrames: ' || numberOfFrames );
DBMS_OUTPUT.PUT_LINE('compressionType: ' || compressionType );
DBMS_OUTPUT.PUT_LINE('numberOfColors: ' || numberOfColors );
DBMS_OUTPUT.PUT_LINE('bitRate: ' || bitRate );
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
/
here is the full error :
Error report - ORA-06598: insufficient INHERIT PRIVILEGES privilege ORA-06512: at line 37 ORA-06512: at "ORDSYS.ORD_VIDEO", line 50 ORA-06512: at line 17 06598. 00000 - "insufficient INHERIT PRIVILEGES privilege" *Cause: An attempt was made to run an AUTHID CURRENT_USER function or procedure, or to reference a BEQUEATH CURRENT_USER view, and the owner of that function, procedure, or view lacks INHERIT PRIVILEGES privilege on the calling user. *Action: Either do not call the function or procedure or reference the view, or grant the owner of the function, procedure, or view INHERIT PRIVILEGES privilege on the calling user.
The error ORA-06598: insufficient INHERIT PRIVILEGES privilege
is warning you about a possible privilege escalation issue. You have a more powerful user calling a package owned by a less powerful user. That situation isn't normally a problem, but in this case the package being called includes AUTHID CURRENT_USER
, which means the package runs with the more powerful user's privileges.
To indicate to Oracle that you trust the less powerful user not to abuse the elevated privileges, you have to allow it to inherit the privileges with a command like this (assuming you are running the PL/SQL block as SYS):
GRANT INHERIT PRIVILEGES ON USER SYS TO ORDSYS;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With