Calling schema specific packe/function from PL/SQL
From PL/SQL I am trying to call a package function in a specific schema (see below). When I try it gives me this error:
Invalid function body condition: ORA-06550: line 3, column 15: PLS-00201: identifier 'SCHEMA1.SIS_EXPRESS' must be declared ORA-06550: line 3, column 1: PL/SQL: Statement ignored
Am I missing something as I thought this was the correct syntax?
DECLARE button_ok boolean := FALSE;
BEGIN
button_ok := my_schema.SIS_express.ok_to_add (:APP_USER,:P0_LOGIN_SCHOOL_YEAR,:P0_LOGIN_SCHOOL,:APP_ID,:APP_PAGE_ID);
<<end_of_trigger>>
return button_ok;
END;
An Apex workspace is associated with one or more schemas.
An Apex application in that workspace needs to select one of these schemas as its parsing schema.
This means that all application code (PL/SQL and SQL code you write in that Apex app) will be parsed (using the DBMS_SYS_SQL package) as the parsing schema.
Note that the current and acual schema for the Apex database session will the anonymous schema account as configured for connectivity for that database access descriptor (DAD) on the Apache server. You do not connect (via Apex) as your parsing schema. You connect to an anonymous schema. It runs trusted Apex code (that executes with the Apex schema's privs). This code parses your Apex app code via the system package to be executed as your parsing schema.
So you need to make sure that your parsing schema has the appropriate rights to execute the PL/SQL and SQL application code you put into your Apex application.
Also be aware that if you use that DAD to directly execute your PL/SQL code in the database (procedures or functions), the call will be made from the anonymous database schema used by that Apache DAD connection - thus that schema will then need to have exec rights on your code.
In the case of the Apex flow engine - public exec rights exist on it and thus that DAD session from Apache can logon as the anonymous schema and execute the Apex run-time to run an Apex application.
Similar Messages
-
Calling C functions from PL/SQL. (without OCI )
hi all,
We are trying to call and external C routine (stored in a .so file) from a PL/SQL procedure.
The error obtained is ORA-28576 ( which occurs after connection to the external routine has been established successfully.)
, which states that the problem may lie in:
a) Abnormal Termination of external C routine.(i.e a case of coredump, memory fault etc).
b) Network Problems.
c) Internal Logic Error in the RPC transfer code.
We tried calling the C .so functions from a C executable and it is working fine. Also there doesn't appear to a problem in the network connections too.....
The environment we are working on is Digital Unix 4.0 F. and we are using Oracle 8.0.6
Please advise,
KrishnanThere have been reported problems with specific compiler versions. Check with oracle as see if there is a specific compiler version number you need for a specific database release.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by krishg:
hi all,
We are trying to call and external C routine (stored in a .so file) from a PL/SQL procedure.
The error obtained is ORA-28576 ( which occurs after connection to the external routine has been established successfully.)
, which states that the problem may lie in:
a) Abnormal Termination of external C routine.(i.e a case of coredump, memory fault etc).
b) Network Problems.
c) Internal Logic Error in the RPC transfer code.
We tried calling the C .so functions from a C executable and it is working fine. Also there doesn't appear to a problem in the network connections too.....
The environment we are working on is Digital Unix 4.0 F. and we are using Oracle 8.0.6
Please advise,
Krishnan<HR></BLOCKQUOTE>
null -
How to call javascript function from PL/SQL procedure
Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?
Hi,
I have a requirement to call Javascript function inside a After Submit Process.
clear requirement below:
1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
2. user clicks on "save files" button
3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
Hope this clarify U.
Krishna. -
Calling Javascript function from PL/SQL Process
I am new to APEX and Javascript so please forgive my question.
I have a process on page which successfully runs a few procedures etc. but now, as part of this process, I want to call a javascript function I have typed into the HTML Header.
My question is how can I call the javascript function from my process? Is it possible?
Many thanks
Winnie
ps. as an example my javascript looks like:
<script language="JavaScript">
function test(){
var decision = confirm("Click a button below and watch what pops up next.");
alert(decision);
</script>See: How to call a javascript function from pl/sql?
-
Without calling stored procedure or functions from database
Hi,
I am using Jdeveloper 11.1.1.5.0.
=>How to do PL/SQL procedures and functions in ADF without calling stored procedure or function from DB?S, PL/SQL procedures and functions are done in Application Module class or in managed bean..By calling the stored procedures or functions from DB.
But I am asking how to do if DB doesn't have any procedures,triggers and functions. -
Accessing a C function from PL/SQL.
I have a c function that I would like to access from pl/sql, that is call as any other function in pl/sql. Is this possible? Where can I read about it?
Yes, this is possible. You have to use the feature named external procedure that involves Oracle Net configuration. Here is a example with Oracle 8:
http://www.unix.org.ua/orelly/oracle/prog2/ch21_01.htm -
Is it possible to call the Print Quote functionality from Custom ADF page
Hi,
We are researching if it is possible to call the Print Quote functionality from the Custom ADF application.
Goal is to pop up the PDF report upon clicking the Print Quote button on the custom page. Is it possible ?
Atleast advice on the direction to go forward is appreciated.
Thanks
SaiHi ,
Please check following thread on forum -
Re: ADF: Calling OAF Page from ADF page
Check this may also be useful-
https://blogs.oracle.com/shay/entry/to_adf_or_oaf_or
I have not tried yet but Steven Chan (Sr. Director OATG) suggest following methodolgy for this-
https://blogs.oracle.com/stevenChan/entry/appsdatasource_jaas_ebs
Thanks,
Ashish -
ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http
I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
when browsed through some of the messages they point to setting Oracle Wallet Manager.
I am trying to connect
Any idea on how to resolve this issue ?
your input is appreciated.
Thanks
RaviDuplicate post ... please ignore.
-
Calling an external C function from a C file in JNI
Hello,
I am trying to call an external C function, from a C file which is being called by a Java file. I am getting an unresolved symbol error. I have tried many things like, making the external C function in the format of JNI, etc, etc. It is still not working. I think it has something to do with linking the two C files. If anyone can please answer this, it would greatly help me. here is the code:
HelloWorld.c:
#include <jni.h>
#include <stdio.h>
#include "MyOldHello.h"
#include "HelloWorld.h"
JNIEXPORT void JNICALL
Java_HelloWorld_print(JNIEnv *env, jobject obj)
helloPrint();
return;
HelloWorld.java:
class HelloWorld
private native void print();
public static void main(String[] args)
new HelloWorld().print();
static
System.loadLibrary("HelloWorld");
System.loadLibrary("MyOldHello");
MyOldHello.c:
#include <jni.h>
#include <stdio.h>
#include "MyOldHello.h"
void helloPrint()
printf("\nHello World!\n");
MyOldHello.h:
void helloPrint();
Now i use the Visual C++ command prompt to compile this by saying:
javac HelloWorld.java
javah -jni HelloWorld
cl -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll
and now it gives me the error saying that there is an unresolved external symbol, which is the call to helloPrint in the file HelloWorld.
If anyone knows how to solve this, or how to call external C functions from a C file that is being called from a Java file using JNI, please respond.
Thanks
NickHi,
In your post on velocity review, you did not compile MyOldHello.c. You compiled a C file that included the header file for it and called a method defined in the header. The linker is never going to be able to find the code for this if you do not include the object file for this.
Try this. You will also have to add in any JNI libraries you need to link against but I am sure you could work that out.
cl /c MyOldHello.c
cl /c -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD HelloWorld.c
cl /LD MyOldHello.obj HelloWorld.obj /FeHelloWorld.dll
[http://msdn.microsoft.com/en-us/library/f35ctcxw(VS.80).aspx]
Cheers,
Shane -
Is it possible to call a windows batch file from PL/SQL
Hi gurus,
Would require your help.Is it possible to call a windows batch file from PL/SQL??If yes can you give an example for the same or any workaround for the same.
Regards
VijayHi!
Youn need some extproc related entries in you listener.ora and tnsnames.ora file.
*1. In the listener.ora:*
Defining the listener process is done in two parts.
The information contained in each listener differs!!!
The first part is as follows:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc)) <--- *ADD THIS LINE
(ADDRESS = (PROTOCOL = TCP)(HOST = yourhostname)(PORT = 1521))
)The seoncd part is as follows:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = YOUR_GLOBAL_DBNAME)
(ORACLE_HOME = c:\oracle\product\10.2.0) <-- THIS IS YOUR ORACLE_HOME
(SID_NAME = YOUR_SID) <-- SID
(SID_DESC = <--- ADD THIS LINE
(SID_NAME = PLSExtProc) <--- ADD THIS LINE
(ORACLE_HOME = c:\oracle\product\10.2.0) <--- ADD THIS LINE AND EDIT TO YOUR ORACLE_HOME
(PROGRAM = extproc) <--- ADD THIS LINE
(ENV = "EXTPROC_DLLS=ANY") <--- ADD THIS LINE
) <--- ADD THIS LINE
)*2. In the tnsnames.ora you need to add the following entry:*
*(The KEY value entered must be match to the KEY value entered int the listener.ora file!)*
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)Finally you need to restart your listiner. After restarting there will be a service called "PLSExtProc" in your listener.
This are only examples for extproc configuration, your tnsnames.ora and listener.ora can be differs.
FIRST MAKE MAKE A BACKUP OF YOUR ORIGINAL tnsnames.ora AND listener.ora FILES
For more information please check metalink note 68061.1 "EXTPROC: Creating External Procedures on Windows NT"
Bestr Regards
Norbert -
Is it possible to call a windows batch file from PL/SQL block ??
Hi gurus,
Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
Regards
VijayYou didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files -
Calling a pure C function from JNI method
Is it posible to call a pure C function from a JNI method.?
I am communicating with an external device whose API is written in C language.
Would it work this way
If I declare empty native methods in Java and those methods in C call pure C methods?
Thank You...Hello,
I have a similar problem and I posted it here http://www.velocityreviews.com/forums/t724826-jni-calling-an-outside-function-in-the-c-file-which-is-being-called-by-the-java-file.html. If you can answer the question, it would greatly help me.
Thanks
Nick -
Calling a Java Function from PL/SQL
Hi,
I would like to call a Java API from a java class residing on the middle tier ($OA_JAVA)
from the subscription code of a business event. The business event will have a
subscription with java rule function as my Java API. And the business event will be
raised from PL/SQL code using WF_EVENT.RAISE API. I want the Java API to
executed SYNCHRONOUSLY without deferring the event. Can you please provide
pointers to this.
Regards
RameshDocumentation here: http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref185
says JPublisher can publish records too.
But when I change the example given at http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref190 as following:
PACKAGE "COMPANY" AS
type emp_rec is record (empno number, ename varchar2(10));
type emp_list is varray(5) of emp_rec;
type factory is record (
name varchar(10),
emps emp_list
function get_factory(p_name varchar) return factory;
END;
then I see <unknown type or type not found> at sql or java files generated. Any ideas? -
Calling function from PL/SQL block
Hi,
A very simple question.
A have a function called "test1" in my database. It is there i double chekked.
I would like to call this function from a block:
DECLARE
BEGIN
TEST1(1202);
END;
This gives me an error.
Why is this?user610868 wrote:
Hi,
A very simple question.
A have a function called "test1" in my database. It is there i double chekked.
I would like to call this function from a block:
DECLARE
BEGIN
TEST1(1202);
END;
This gives me an error.
Why is this?Hello
A very very basic thing to do when you get an error is to include details of it. That helps narrow it down from one of the 1000s of potential Oracle errors it could be.
Anyway, a function returns a value, and in PL/SQL you need to capture that otherwise you'll get "an error". Modify your code like so
DECLARE
l_Test1Val VARCHAR2(4000); --CHANGE THIS TO BE THE SAME AS THE RETURN TYPE FOR YOUR FUNCTION
BEGIN
l_Test1Val := TEST1(1202);
END;HTH
David
Edited by: Bravid on Oct 25, 2011 3:57 PM
removed a ; -
Calling a BOOLEAN returning function from SQL
Hello All,
I have created below function which return BOOLEAN value :
CREATE OR REPLACE FUNCTION FUNC_1
P_EMPID IN emp.empno%type
)RETURN BOOLEAN
AS
L_VAR NUMBER;
BEGIN
SELECT 1 INTO L_VAR
FROM EMP
WHERE EMPNO = P_EMPID;
IF L_VAR = 1 THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;Now I want to call this function from SELECT but I know that SQL does not support BOOLEAN value so I tried in other way i.e. via CASE
SELECT CASE FUNC_1(7788)
WHEN TRUE THEN 'TRUE'
WHEN FALSE THEN 'FALSE'
ELSE 'NULL'
END CASE
FROM DUALBut it is giving me error "ORA-00904: "FALSE": invalid identifier'
How can I achieve this ?
Thanks & Regards,
RakeshHi Rakesh,
Why cant you try something like this, When BOOLEAN type is not supported in SQL.
Here I have made the return value a number. And, at case comparison, we get the BOOLEAN
result as TRUE of FALSE.
CREATE OR REPLACE FUNCTION func_1 (p_empid IN emp.empno%TYPE)
RETURN NUMBER
AS
l_var NUMBER;
BEGIN
SELECT count(*)
INTO l_var
FROM emp
WHERE empno = p_empid;
IF l_var = 1
THEN
RETURN 1;
ELSE
RETURN 0;
END IF;
END;And,
SELECT CASE func_1 (55656)
WHEN 1
THEN 'TRUE'
WHEN 0
THEN 'FALSE'
END
FROM DUAL;Which return TRUE if the Employee Number Exists and FALSE if doesnot.
Thanks,
Shankar.
Maybe you are looking for
-
I'm trying export a Keynote presentation to PDF, or other format, to use on Windows PC, iPad and other devices. The file Keynote create is way too large at 30mb+. So cant email or share it very easily If I print it and to Adobe PDF I can get it to 3m
-
Skype does not want to join group calls at all.
Hello.I recently got this very unusual problem with Skype. While I was talking in a group conversation, my internet bugged out, and as a result, of course, it kicked me out of the call. Afterwards, the internet started working just fine, but now it
-
Bad performance when deleting business partner in CRM
Hi, we try to delete 1.7 million partner in our CRM system. Our System has : SAP_BASIS 620 0057 SAPKB62057 the database is ORACLE For the deletion we use the report BUPA_TEST_DELETE with packages of 1000 partners each. We have that the up
-
Create document set using ECMA Script
Hi, I want to create a document set in SharePoint 2010 document library where i have already included document set content type. Is there any way to create a document set using ECMA Script?? If yes, then please provide the sample code for this... Tha
-
HT1751 Help with importing itunes playlists from an older OS?
I tried the steps here: http://support.apple.com/kb/HT1751 for importing my older playlists from time machine, but got this in response: "The file "iTunes Library.itl" cannot be imported because it does not appear to be a valid exported file." Old O