?
Solved

HOw to remove a policy function from a table

Posted on 2007-10-01
2
Medium Priority
?
6,051 Views
Last Modified: 2013-12-19
I've imported a database into Oracle 10g. How do I remove policy functions from tables? When I try to display data from some tables I get the ORA-28100: policy function schema LBACSYS is invalid. Any thoughts?
0
Comment
Question by:dodgerfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 19994249
First, find the policies on that table

SELECT *
  FROM all_policies
 WHERE object_owner = 'YOUR_SCHEMA' AND object_name = 'YOUR_TABLE'


Then remove them, substituting "YOUR_POLICY" with whatever you get from the previous query

exec dbms_rls.drop_policy('YOUR_SCHEMA','YOUR_TABLE','YOUR_POLICY');
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 19994529
If you can query dba_ views, then use that instead of all_policies

SELECT *
  FROM dba_policies
 WHERE object_owner = 'YOUR_SCHEMA' AND object_name = 'YOUR_TABLE'
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question