Trying to implement a VPD policy but got the following error ORA-20001
hey good day,
I'm trying to implement a VPD policy to my application. After I have performed the below task (Label 1) in oracle 10g database. When I'm about to access my application page in ApEx 3.2.1 I got the following error
ORA-20001: get_dbms_sql_cursor error ORA-28110: policy function or package CHARLES.VPD_PREDICATE has error
any form of assistance will be greatly appreciated.
thanks in advance
Label 1
USER is "VPD_ADMIN"
SQL> create or replace context empnum_ctx using set_empnum_ctx_pkg;
Context created.
SQL> CREATE OR REPLACE PACKAGE set_empnum_ctx_pkg IS
2 PROCEDURE set_empnum;
3 END;
4 /
Package created.
SQL> CREATE OR REPLACE PACKAGE BODY set_empnum_ctx_pkg IS
2 PROCEDURE set_empnum IS
3 emp_id NUMBER;
4 BEGIN
5 SELECT EMPNUM INTO emp_id FROM CHARLES.INSTRUCTOR
6 WHERE upper(username) = nvl(v('APP_USER'), USER);
7 DBMS_SESSION.SET_CONTEXT('empnum_ctx', 'empnum', emp_id);
8
9 EXCEPTION
10 WHEN NO_DATA_FOUND THEN NULL;
11 END;
12 END;
13 /
Package body created.
SQL> create or replace package vpd_policy as
2 function vpd_predicate(object_schema in varchar2 default null, object_name in varchar2 default null)
3 return varchar2;
4 end;
5 /
Package created.
SQL> create or replace package body vpd_policy as function vpd_predicate(
2 object_schema in varchar2 default null, object_name in varchar2 default null)
3 return varchar2 as
4
5 BEGIN
6 if (USER = 'ADMIN') and (v('APP_USER') is null) or
7 (USER = 'MICHAEL.GRAY') and (v('APP_USER') is NULL) then
8 return '';
9 else
10 return '(
11 exists (
12 select "INSTRUCTOR"."EMPNUM" as "EMPNUM",
13 "INSTRUCTOR"."FIRSTNAME" as "FIRSTNAME",
14 "INSTRUCTOR"."LASTNAME" as "LASTNAME",
15 "LOAD"."COURSEID" as "COURSEID",
16 "COURSE"."CREDIT" as "CREDIT",
17 "COURSE"."HPW" as "HPW",
18 "LOAD"."CAMPID" as "CAMPID",
19 "LOAD"."YR" as "YR",
20 "INSTRUCTOR"."POS" as "POS",
21 "INSTRUCTOR"."USERNAME" as "USERNAME",
22 "INSTRUCTOR"."DEPARTMENT_NAME" as "DEPARTMENT_NAME",
23 "LOAD"."SEMESTER" as "SEMESTER"
24 from "COURSE" "COURSE",
25 "INSTRUCTOR" "INSTRUCTOR",
26 "LOAD" "LOAD"
27 where "INSTRUCTOR"."EMPNUM"="LOAD"."EMPNUM"
28 and "LOAD"."COURSEID"="COURSE"."COURSEID"
29 and department_name = (
30 select department_name from departments
31 where upper (assigned_to) = nvl(v(''APP_USER''),USER) )
32 )
33
34 or upper(username) = nvl(v(''APP_USER''), USER)
35 ) ';
36
37 END IF;
38 END vpd_predicate;
39 END vpd_policy;
40 /
Package body created.
SQL> begin
2 dbms_rls.add_policy(
3 object_schema => 'charles',
4 object_name => 'load',
5 policy_name => 'Loading Policy',
6 function_schema => 'charles',
7 policy_function => 'vpd_predicate',
8 statement_types => 'select, update, insert, delete');
9 end;
10 /
PL/SQL procedure successfully completed.
ORA-20001 isn't an Oracle error message it was coded into your application by a developer: Look it up.
Consider too the following:
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;so if the employee identifier is not found ... is this really what you want? If an employee isn't valid shouldn't you know it?
Similar Messages
-
I tried to update my iPhone4's, but get the following error message: iTunes could not back up the iphone "iPhoneName" because the backup was corrupt or not compatible with the iphone. Delete the backup for this iphone, then try again.
The solution will be found here, select your computer type and software.
http://support.apple.com/kb/TS2529 -
I tried several times to install photoshop and got the following error messages:
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 2 error(s)
----------- Payload: Microsoft Visual C++ 2008 Redistributable Package (x86) 9.0.30729.5677 {539B5BB0-18F9-11E2-BBBC-00215AEA26C9} -----------
ERROR: Third party payload installer vcredist_x86.exe failed with exit code: 1619
ERROR: Failed to repair Microsoft Visual C++ 2008 Redistributable Package (x86). Please try repairing it by double clicking on the executable at "C:\Users\Alan\AppData\Local\Temp\{F6735005-7472-4638-B149-A83B93D9AE90}\Photoshop_15_LS2 0_win64\Adobe CC 2014\payloads\Microsoft VC 2008 Redist (x86)\vcredist_x86.exe", or download and install the latest Microsoft Visual C++ 2008 Redistributable Package (x86) from Microsoft website - www.microsoft.comHi Alan1942,
Please go through the link below to do a clean uninstall through the cleaner tool.
Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
If that fails, try the link below for additional steps.
Troubleshoot with install logs | CS5, CS5.5, CS6, CC
Regards,
Anand -
Tried to "Open As" in PS a NEF file I modified in LR. Got the following error message: "Could not complete your request because the file format module cannot parse the file." I can "Open" the file in PS, but then the changes I made in LR (and saved in the associated meta data file with the "Control S" command) are not applied to the opened PS file. HELP!
If you are working with a file you modified in Lightroom, you should go to the Lightroom Photo menu and choose Edit in... and the version of Photoshop you want to open it in.
There a dialog will ask if you want to transfer the LR settings you made to your photo when you open in Photoshop.
Gene -
I tried to order a book on iphoto but got the following message from Apple : "the file contains text with drop shadows. As a result Apple is unable to process your order" Does anyone know what this means and how to fix it? Thanks!!
Hello Katiebell62
Check out the troubleshooting steps to try and resolve your issue with purchasing a book through iPhoto.
iPhoto: Difficulty submitting a book, card, or calendar order
http://support.apple.com/kb/TS2516
Thanks for using Apple Support Communities.
Regards,
-Norm G. -
There was a user account established on my computer when I bought it. I later added an admin account. I realized that I did not have the password to the original account. Using the admin account, I changed the password for the user account. I then realized that I now couldn't access the keychain. I followed the instructions to reset a login keychain. Opened Keychain Access, selected Preferences, clicked Reset Login Keychain, typed the new password I'd created for the account but received the following error. Unable to obtain authorization for this operation. I cannot find a user/library/keychain folder so I can't delete the user keychain file. How can I reset the keychain?
A lot longer ago than that. PowerPC apps haven't been supported since Lion, 10.7.x.
You may have just purchased the game, but the developers obviously haven't kept up to date with the requirements for newer versions of the Mac OS.
You have three options, depending on how old your Mac is.
1) If it were ever able to boot directly to Snow Leopard, you could create a separate partition and install SL onto that partition. Make sure to turn on the option during the installation to install Rosetta. That is OS X's PPC emulator.
2) If your Mac is too new to install Snow Leopard, then you can purchase and install Snow Leopard Server within a VM, such as Parallels, VirtualBox, or Vmware.
3) Use a separate older Mac for running outdated software. -
Help. I tried to open my Illustrator CS6 today and got the following error message, "To open Adobe Illustrator CS6 you need to install the legacy Java SE runtime". The window then states, "Click More info...to visit the legacy Java SE 6 download website." I do click on the More Info... button, but the webpage is blank. Please help.
Thanks,
LeoLeo,
Depending on your OS, you should be able to use;
Win:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419 409.html
Mac:
http://support.apple.com/kb/DL1572
Some have found that the page may turn up blank to start with, so it may be necessary to reload the page.
Others have found that it may depend on browser. Specifically, a switch from Safari has solved it in one case. -
Just tried to install I-tunes an got the following error message
Just tried to install i_Tunes on my PC and got the following error:
"There is a problem with this Windows Installer package. Aprogram run as part of the set-up did not finish as expected. Contact your support personel or the vendor...
I am now i-Tuneless...!!!
Anyone out there who can help. Have applied the latest MS patches to my Windows XP Service Pack 3 but that made no difference...Audacity > Preferences > Directories. You will probably need to use an external drive as it sounds like you Mac's drive is getting too full???
-
While trying to setup a time capsule backup to my MyBookLive external drive, I got the following error message: The network backup disk does not support the required AFP features. What's up with this?
This means that your NAS does not support the required encryption. Update your NAS to the latest firmware or ditch it and buy a Time Capsule (they are the most reliable when using TM).
-
I bought a mac companion for my desktop mac running os x but received the following error message when I tried to install the quikprotect software download: "power pc no longer supported." I did not read that anywhere when investigating. What gives?
PPC, also known as PowerPC has not existed on Macs since the beginning of 2006. Apple made a bridge software and included it with Mac OSes until 10.6.8 known as Rosetta that would allow you to run software written for the PowerPC Macs. 10.7 and later can't run that bridge software. You have one of several options:
Install 10.6 retail on a USB Flash drive, and run that application while booted from there.
Find an update designed for 10.7 or later of the software.
Find a combination of Virtualbox or Paralllels that can legally run a version of 10.6 side by side with your 10.7 software.
Run Windows on your Mac with Virtualbox or use CrossOver that requires no Windows to run a Windows version of your application.
Your Mac is an iMac Intel. I will ask a moderator redirect your thread to the 10.7 forum, and no action is needed on your part. -
I got the following error when trying to strt itune "microsoft visual c runtime library"
Dear all
I got the following error when trying to start itune(latest version)
Runtime error
"microsoft visual c ++ runtime library"I kept getting the same error message too! Thank goodness I'm not alone in this!
-
While trying to download the 64 bit version of iTunes for a Windows 7 PC, I got the following error message: A program required for this install to complete could not be run. Any suggestions?
I would try removing and reinstall the Apple software using:
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7 -
I tried to open an Audacity file. I got the following error message: "Warning there is very little free disc space left on this volume. Please select another temporary directory in your preferences. How do I select another temporary directory?
Audacity > Preferences > Directories. You will probably need to use an external drive as it sounds like you Mac's drive is getting too full???
-
When I tried to run php file I am getting the following error message, "/home/karthick/Desktop/PHP files/third.php could not be opened, because the associated helper application does not exist. Change the association in your preferences." How to fix this?
first, you just asked me to use MS file Explorer to see what the properties were.,..and to ask what happened. Yes - that's on my hard drive. The problem I have is opening word files in a DB that is web enabled.....I've used Firefox browser for that, and everything else , for years...... When I look at the Tools, and options on FireFox., as your support page noted.....NOTHING is listed in the Applications tab....hence my note asking for help. The file I need to open is a Word file out on a web enabled DB. It's not on my hard drive - I have to problems opening docs there - but for that, I don't use Firefox
-
When trying to export an iMovie project I get the following error message (-108).
When trying to export an iMovie project I get the following error message (-108)
Hi
Error -108 memFullErr Ran out of memory [not enough room in heap zone]
Turn off - TimeMachine usually works - re-try.
(the Application down in the Dock - not the Device)
But this can mean many thing's - My first thought is
• Free Space on Start-Up hard disk. How much ? (other disks do not count)
Yours Bengt W
Maybe you are looking for
-
Change CSS styles for Acces Web App
Here's the problem, the #s4-mini-header needs to be set to display:none so the SharePoint header is not shown. Ideally this would be conditional based on group membership (i.e. Site Owners would see the section, for read only it would be hidden) I n
-
How can i get iOS 5 in mi iPhone 3GS?
I need to downlode iOS 5 but i don't now How
-
Viewing PDF comments on Mobile deivices
Hello! I have had several clients complain that they cannot see the comments I make on their PDFs when they try to view them on mobile devices. Is there a fix for this or perhaps an app that will enable the comments to show up?
-
New Feature Phones in the Future?
I have been looking at the feature phones that verizon has currently on their website and they haven't changed for some time. As of Feb 1 the data packages have changed and was wondering which of the feature phones currently on the list would require
-
Analyzer 7 Across the WAN using NAT addresses
We have acquired several companies that have their own internal ip addresses that are duplicates of some of our internal ip addresses. To overcome this we use Network Address Translation (NAT). However, we cannot get Analyzer to work with these NAT a