Full Data reduction policy failed - oracle

My oracle version is 12c, I am trying to create full data reduction policy. So, for that first, I grant dbms_redact procedure execute permission to my retailx user. Below is the query I used.
grant execute on sys.dbms_redact to retailx;
Granting permission has failed with this error "ORA-00942 table or view does not exist"
So I tried this command
grant execute on DBMS_REDACT to retailx;
It also outputted the same error message "ORA-00942 table or view does not exist"
How can I fix this. I searched articles but nothing has found so far can someone please help me.

Related

How to collect more statistics in Oracle?

I'm new to Oracle and would like to know the way how to get more statistics in the case i'll describe below. I'm using SQL Developer.
First, I execute this:
SET autotrace on;
SELECT NAME
FROM PASSENGER
WHERE ID_PSG IN (
SELECT ID_PSG
FROM PASS_IN_TRIP PIT JOIN TRIP T on T.TRIP_NO = PIT.TRIP_NO
WHERE UPPER(TOWN_FROM) = 'MOSCOW'
)
In Script Output I can see info about the query from PLAN_TABLE table and after that there's the text:
Unable to gather statistics please ensure user has correct access. The
statistic feature requires that the user is granted select on
v_$sesstat, v_$statname and v_$session.
I've tried to find a solution here already, there's a link:
SQL Developer : Unable to gather system statistics : insufficient privileges
So I executed the same commands and the grants were all succeded:
GRANT CREATE session TO PRACTICE;
GRANT GATHER_SYSTEM_STATISTICS TO PRACTICE;
GRANT CONNECT TO PRACTICE;
Then I disconnected, closed SQL dev, opened it, connected again as it was described in the solution from the link, ran
execute dbms_stats.gather_system_stats ('START');
and got this:
PL/SQL procedure successfully completed.
Then I thought everything is fine and tried to execute the code from the very beginning and its Script Output was still the same as before.
Do I have to grant anything else or this statistics can be found in the other place or I just did everything wrong?
That error is about sqlplus autotrace, it's not about gathering system statistics like your linked post seems to be about.
There is a role created specifically for these grants called plustrace https://docs.oracle.com/database/121/SQPUG/ch_eight.htm#SQPUG535
To use this feature, you must create a PLAN_TABLE table in your schema
and then have the PLUSTRACE role granted to you. DBA privileges are
required to grant the PLUSTRACE role. For information on how to grant
a role and how to create the PLAN_TABLE table, see the Oracle Database
SQL Language Reference.

How to create olap user in oracle?

I am trying to build Olap. While building an error has been occurred. First of all, I downloaded olaptrain schema, then I opened a command prompt on the olaptrain folder, then I logged on sqlplus with sysdba. After that, when I Write "#Install_olaptrain", I got an error "ORA-01919 role Olap_User Not Exist". What is the source of error? How can we create that role? Error
Well, creating a role is a simple task:
create role olap_user;
but I'm not sure it is the way to go. I'd expect the script to contain all info it needs to complete successfully (which includes the abovementioned create role). Anyway: create it, it won't do any harm, but might help.

SQL Developer : Unable to gather system statistics : insufficient privileges

I was trying to gather system statistics to get the report information.
I tried the same via SQL developer and found some privillage issues and I referred this link for the solution,
GRANT CREATE session TO TEST_DB;
GRANT GATHER_SYSTEM_STATISTICS TO TEST_DB;
GRANT CONNECT TO TEST_DB;
All grant succeeded.But,
execute dbms_stats.gather_system_stats ('START');
gave me the error
ORA-20000: Unable to gather system statistics : insufficient privileges
ORA-06512: at "SYS.DBMS_STATS", line 23190
Finally, I tried with command line and finished the things without any issues,
PL/SQL procedure successfully completed.
why it was showing insufficient privileges issue in SQL developer ?
Role privileges like GATHER_SYSTEM_STATISTICS (as opposed to sys privileges, like CREATE TABLE) don't take effect immediately; they only take effect at the next logon (presumably because Oracle does some kind of caching internally).
So if you'd logged off and on in SQL Developer, it would have worked, as well.

Cannot execute procedure in oracle 10g says Table or View does not exist

I have an Oracle database which was already created and designed by someone else previously, in my company. My problem is that some procedures are not executing. I'm getting the error:
Table or procedure or view does not exist
But, I can see those procedures from Toad. I already tried to grant some privileges from sysdba, the result is the same; I get the same error.
Any help would be highly appreciated.

ORA-01031 in insert

i was running an insert query on a synonym i got ORA-01031 in sql developer, we are accessing almost all tables through synonym only, but only this one in the schema gave ORA-0103 error. Please guide.
Error report: SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: Ask the database administrator to perform the operation or grant
the required privileges.
For Trusted Oracle users getting this error although granted the
the appropriate privilege at a higher label, ask the database
administrator to regrant the privilege at the appropriate label.
did you execute something like:
GRANT select, insert, update, delete on Table to your_synonym_user;
and this line should be executed by the Table owner or the user with that permission.
It looks very much like the permissions you have to either the underlying table, or the synonym are insufficient, or possibly that your password has expired?

Resources