Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HOw to remove a policy function from a table

Posted on 2007-10-01
2
Medium Priority
?
6,207 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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.

609 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