Home » SQL & PL/SQL » SQL & PL/SQL » virtual private database (oracle database 12c)
virtual private database [message #666221] Fri, 20 October 2017 23:50 Go to next message
smaher
Messages: 2
Registered: October 2017
Junior Member
hi all
i have a table xyz , and there is a VPD in this table , user x can see all 50 rows in this table , user y can see 20 rows of this table , user z can see 20 rows of this table.

my question is :
how can i write sql query to get remain 10 rows for user x, which does not seen by user y and user z.

thanks
maher
Re: virtual private database [message #666222 is a reply to message #666221] Sat, 21 October 2017 02:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You can't without knowing the policy itself.

Re: virtual private database [message #666223 is a reply to message #666221] Sat, 21 October 2017 02:31 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

Your user X must have been granted the EXEMPT ACCESS POLICY privilege. You'll need to reverse the VPD policy predicate. If you don't know what it is, use EXPLAIN PLAN on a query and you'll see the filter.
Re: virtual private database [message #666224 is a reply to message #666223] Sat, 21 October 2017 03:56 Go to previous messageGo to next message
smaher
Messages: 2
Registered: October 2017
Junior Member
hi john
how can i reverse the VPD policy predicate ?

Thanks
maher
Re: virtual private database [message #666225 is a reply to message #666224] Sat, 21 October 2017 04:16 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
If you don't know what it is, use EXPLAIN PLAN on a query and you'll see the filter.
Previous Topic: REPLACE Function
Next Topic: Changing the date format on a specific field
Goto Forum:
  


Current Time: Thu Mar 28 05:40:18 CDT 2024