Invoking procedures.

can i invoke 2 procedures in a sub program...i have 2 procedures called test and test1r...
can any body check the fallowing error..
how can i invoke the two procedures in a single sub program..
thanks.
SQL> declare
2 id empra.EMPLOYEE_ID%type;
3 name empra.LAST_NAME%type;
4 email empra.EMAIL%type;
5 hiredate empra.HIRE_DATE%type;
6 jobid empra.JOB_ID%type;
7 salary empra.SALARY%type;
8 s empra.EMPLOYEE_ID%type := id;
9 begin
10 test(272,'MMAA','MM_PP',sysdate,'kk_kk',3000);
11 if
12 test1r(151,name,email)
13 then
14 dbms_output.put_line('name' || name);
15 dbms_output.put_line('sala' ||email);
16 end if;
17 end;
18 /
test1r(151,name,email)
ERROR at line 12:
ORA-06550: line 12, column 1:
PLS-00222: no function with name 'TEST1R' exists in this scope
ORA-06550: line 11, column 1:
PL/SQL: Statement ignored

these are two procedures..
create or replace procedure test(id in empra.EMPLOYEE_ID%type,name in empra.LAST_NAME%type,email in empra.EMAIL%type,
hiredate in empra.HIRE_DATE%type,jobid in empra.JOB_ID%type,salary empra.salary%type) is
begin
insert into empra(employee_id,last_name,email,hire_date,job_id,salary) values( id,name,email,sysdate,jobid,salary);
--select  name,email into name,email from empra where employee_id = id;
end;
create or replace procedure test1r(id in empra.EMPLOYEE_ID%type,name out empra.LAST_NAME%type,email out empra.EMAIL%type) is
s empra.EMPLOYEE_ID%type := id;
begin
if s = id
then
select name,email into name,email from empra where employee_id = id;
/*dbms_output.put_line('name' || name);
dbms_output.put_line('sala' ||email);*/
end if;
end;

Similar Messages

  • Invoking procedure from menu module

    How can I invoke procedure that is part of Form module from menu module which is attached to it.
    When I reference it with:
    procedure_name;
    I receive:
    Error 201
    Identifier procedure_name must be declared.
    null

    It can be done by calling user-named trigger from menu:
    Execute_Trigger('my_user_named_trigger');
    and in Forms my_user_named_trigger is:
    BEGIN
    procedure_name;
    END;
    I hope this will help you
    Helena

  • Invoke procedure problem in one's own schema

    I have a legacy database. If I create a procdeure X as owner student in schema student and invoke as
    execute x; it works but if I say execute student.x:; It gives error student.x must be declared.
    Why user is not able to invoke procedure with schema.prc_name in his own schema when it was created by him?
    Here is the syntax of create x by student in his schema:
    create or replace procedure student.x as
    begin
    null;
    end;
    -----------------------------

    What database version are you using? And can you post your exact steps to reproduce the error like below?<br>
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    <br>
    test@ORCL> create or replace procedure test.x as
      2  begin
      3  null;
      4  end;
      5  /
    <br>
    Procedure created.
    <br>
    Elapsed: 00:00:00.32
    test@ORCL> execute x;
    <br>
    PL/SQL procedure successfully completed.
    <br>
    Elapsed: 00:00:00.00
    test@ORCL> execute test.x;
    <br>
    PL/SQL procedure successfully completed.
    <br>
    Elapsed: 00:00:00.00
    test@ORCL>

  • Urgent:why portal30 DAD can not invoke procedure through url

    My portal version is 3.0.9
    I found an mod/plsql problem .I created a procedure named current_user like this :
    create or replace procedure current_users
    AS
    ignore boolean;
    BEGIN
    htp.htmlopen;
    htp.headopen;
    htp.title('Current Users');
    htp.headclose;
    htp.bodyopen;
    htp.header(1, 'Current Users');
    htp.bodyclose;
    htp.htmlclose;
    END;
    And I created it in portal30 schema,and I want to use http://<hostname>/pls/portal30/current_users to invoke the procedure but the IE return a "NOT FOUND" error .
    I tried to create the procedure in scott schema,and use http://<hostname>/pls/scott/current_users to invoke the procedure ,it worked well.
    The diffrent between DAD "scott" and "portal30" is the Authorization type,"scott" use basic auth,and "portal30" use sso.
    anybody knows why it appeared?thanks.

    Thanks , it works now .
    But I still has a question,for example:
    When I create a procedure to query what is the newest items be added in content area.
    Let surppose there has two users:A and B,and I want userA to see 10 Items and userB to see
    20 Items because of the diffrent privilege,how can I do it ?
    Thanks again

  • Invoking Procedure from BODS with OUT (output) parameters

    Hi Experts,
    Need your help to invoke Oracle DB Procedure having output parameters from BODS Script
    --Thanks

    Hi Balakrishna,
    IF you want to execute the stored procedure from script first import the SP into your data store first and you can try the below scripts, i am not sure that it will works kindly try and let me know.
    Datastore Name.Owner.Procedure_Name( $Var_1 , $Var_2 );
    or
    SQL('Datastore_name',exec sp_xxx);
    Thanks and regards,
    subbu CH.

  • Help with use of Java Stored Procedures to invoke Java Code within Applicat

    Good afternoon everyone
    Our development team is looking for some assistance/validation of a design strategy we are deploying for a client. Let me first layout the environment and then the design issue at hand:
    Business User Workstation component: Oracle SQL*Developer 1.5.x
    Reporting Tool: Actuate e.Spreadsheet A10
    Application Web UI: J2EE application developed with Eclipse
    Application Scripting: Application has a scripting component whereby business users can write Oracle PL/SQL to perform many of the functions that are available in the Web UI, but can be batched up or repeated several times.
    Application Server WebLogic 9.2.3 (client constraint)
    Database Serve: Oracle 11g, Release 11.1.0.7
    Lots of other stuff included but irrelevant for this conversation.
    Here's the scenario in question:
    1.     Through the scripting solution, the application user must use PL/SQL to invoke functionality within the Web UI. All PL/SQL that the application user creates does not contain any SQL. Instead our security model mandates that “pre-defined” routines will perform all of the SQL operations against the database; the application user simply invokes the stored procedures of functions to perform activities in the database.
    2.     There is a component of the scripting application that facilitates the creation of reports. In our application, we are using Actuate’s e.Spreadsheet Engine to create the report and format the report based on a template. The template is provided as input, as well as other data items, into Actuate for processing. The net result is the report is created by the Actuate e.Spreadsheet engine in pdf format and then sent back to the user for distribution to other users in the company.
    3.     The Actuate e.Spreadsheet engine consists of one or more JAR files within the Application Server framework. The Web UI utilizes these JAR files as well to perform report generation and data manipulation activities. In the case of the reporting functionality, the pdf report that is generated by Actuate is returned into either the Web UI or into the scripting component for persistence in the database. The mechanism exists to create multi-step jobs that can create multiple reports in one run.
    4.     So to facilitate the above, we are creating one or more Java Stored Procedures that will mediate the communication between the PL/SQL the user’s create and the Java components that are required for business processing. PL/SQL will invoke one or more Java Stored Procedures. Then the Java Stored Procedures invoke Actuate e.Spreadsheet, generate the report, saves the report in the database and returns control back to the invoking procedure.
    So the question is: Is this a viable and correct use of Oracle Java Stored Procedures. What are the advantages/disadvantages of doing so? Any security issues or potholes that you can think of? Tuning issues for the JVMs? Any white papers that you can think of?
    For any Oracle employees that respond, material such as Oracle Whitepapers, etc. would be great.
    I can be contacted at (313) 227-4350 or at [email protected]
    Thanks in advance.

    So are you planning on loading the entire e.Spreadsheet engine into the database server's JVM?
    If so, I would expect that to work, but I expect that you'd have some performance issues. I'd expect that the process of building these PDFs is going to be relatively expensive. Tuning the database server's JVM tends to be rather more challenging than tuning JVM's in an app server.
    If not, I'm not sure how the Java stored procedure would invoke the e.Spreadsheet engine on the application server. It is possible to use Oracle AQ to send a JMS message, but I don't think you can use the standard J2EE JMS APIs-- I think you'd have to use Oracle's AQ interface.
    Justin

  • Need assistance invoking a Web Service from JCaps 5.1.2.

    Hello,
    I am working with web services for the first time ever, and am having some trouble invoking one from with JCaps 5.1.2. Basically, the business process is validating fine, and will run up to the Invoke procedure, at which time it throws a log file error:
    HTTP Status-Code 404: Not Found - /wsTestInvoke and the associated fault container is not available.
    However, I have already tested this same wsdl in SoapUI, from the same server which is running the domain. SoapUI runs this wsdl without any errors.
    As stated, this is the first time I have ever tried to use web services. I�m at a loss right now as to what steps to take to even try to debug this. My guess is that something in the JCaps setup needs updated, but I�m not sure what, or where to begin looking.
    FYI, I have created a web service that I am hosting, and it can be invoked fine from SoapUI. My SoapHTTP Client and Server are both configured the same right now, and I know at least the Server is working, since I can host a WS. I just can't seem to invoke one.
    Has anyone seen this error when working with Web Services in JCaps 5.1.2, and any ideas of where to look to start debugging this?
    Any info is appreciated.
    Thanks,
    Alan

    I figured this out myself, and just want to post the resolution in case anyone else runs into this.
    This issue was that I was setting the port and server in the HTTP Client External System config, to be the JCaps domain server and HTTP port. I found that you need to leave the external system properties blank in the HTTP Client, and when you build the code, the environment items then get auto-populated from the wsdl.
    Problem solved.

  • How can I use the procedures and functions in my library

    hello, all
    I have a pl/sql library MYLIB.pld, MYLIB.pll and MYLIB.plx.
    How can I invoke procedures and functions there in JDeveloper?
    Thanks.
    Damon

    I am indeed using ADF BC to re-develop the oracle application.
    Here is my situation:
    We have an oracle form application.
    Our objective is to try to re-use the existing sources in the form application as much as possible:
    1. tons of procedures and functions in a pl/sql library(a file with extension name portfolioLib.pll or portfolioLib.plx);
    2. tons of form-level triggers, data-block triggers and item-triggers;
    3. tons of database stored procedures and triggers;
    After doing a research on JDeveloper, we decide to use ADF Swing+ADF BC to re-develop the application.
    My opinion for the above three kinds of sources in our form application is:
    for 1: we try to move most of procedures and functions into database(except Form build-in);
    for 2: we try to wrap those triggers in a SQLJ class;
    for 3: we try to call database procedures and functions with PreparedStatment or CallableStatement;
    I just do a test on a post-query trigger on a data-block:
    I created a sqlj file, named testSQLJ.sqlj in the test.view package;
    I tried to call it in createInstanceFromResultSet of testDeptVOImpl.java which is test.model package,
    I was told that testSQLJ cannot be found there. why?
    How can I call some classes from test.view package in some classes of test.model?
    I read some documents about how to deal with post-query trigger in JDeveloper: create a view with SQL statement, but it seems that it does not support pl/sql statement there.
    Can you give me some opinion about the above stuff?
    I really appreciate your help.
    Damon

  • Getting NLS setting issues when calling procedure

    Hi,
    Can anybody suggest me what could the problem in the below issue?.
    i am invokeing procedure using DBAdapter. My soa version is 11.1.1.5. When i am calling procedure first time it is working fine. But when i am invoke second time
    it is showing below error. I observed that i am getting error alternativly. So kinldy advice me what could be the issue.
    Error:
    Cause: java.sql.SQLException: ORA-20001: Oracle error -20001: ORA-20001: Oracle error -2074: ORA-02074: cannot SET NLS in a distributed transaction has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set_nls. ORA-06512: at "APPS.APP_EXCEPTION", line 72 ORA-06512: at "APPS.FND_GLOBAL", line 240 ORA-06512: at "APPS.FND_GLOBAL", line 1410 ORA-06512: at "APPS.FND_GLOBAL", line 1655 ORA-06512: at "APPS.FND_GLOBAL", line 2171 ORA-06512: at "APPS.FND_GLOBAL", line 2313 ORA-06512: at "APPS.FND_GLOBAL", line 2251 ORA-06512: at
    Regards,
    Adhi

    Hi:
    Another way to avoid this, is to use an Non-XA Datasource.
    Hope this helps
    best

  • Form on Table with Report works in one environment but not in another.

    Here's a short description of the problem:
    Created a form on a table with report (using the wizard) in an ApEx application. The form and report work perfect in development environment. Once the application is moved to the Test environment, the insert feature of the form does not work. We have verified that the underlying table the form is based on is there with all the fields, primary key, sequence and trigger.
    Any ideas?
    Marc

    Ben,
    I assume that apex_public_user has all the approporiate privilegesapex_public_user requires no privileges other than those it is created with during installation and the execute privileges on procedures it may acquire as URL-invokable procedures are developed and registered.
    Marc - What are the symptoms of the problem (insert does not work) ? What does the debug output show when you run the page in debug mode? Does the "request" value of the button (create button?) match one of the request values recognized by the DML process?
    Scott

  • EJB 3.0 architecture

    EJB 2.1 client does JNDI lookup and gets Remote Home object stub, then asks the Home for a reference to the EJBObject interface and then client can call business method on the bean. Is EJB 3.0 business method invoke procedure same as EJB 2.1?
    Thank you,
    Dragan.
    Edited by: Bobic on Apr 9, 2009 12:08 PM

    Hi Dragan,
    No, it's much simpler now. There are no longer any Home interfaces. The interface you write is called a business interface and you simply cast the result of the lookup to the business interface and call the business methods. In the case of Stateful session beans, the lookup has
    the side-effect of creating a new stateful bean instance.
    Note that this only applies to stateful and stateless session beans. The previous EJB 2.x Entity beans weren't changed due to
    the introduction of the Java Persistence API.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calling a Perl code from pl sql

    Hi,
    I have to carry out a process -wherein - i need to execute 2 plsql procedures and a perl function in between the two. The first pl sql procedure creates a file - which needs to be worked on by the perl file and processed and the resulting file is used by the second and last pl sql procedure. Is there any way to pull this off?
    thanks

    I would seriously question the architecture here... That being said, depending on the Oracle version,
    1) A shell script/ external process could
    - invoke SQL*Plus, run the first procedure
    - Call the Perl script
    - invoke SQL*Plus, run the second procedure
    2) The Perl script could do the same thing (i.e. connect to the database, run the first procedure, process the file, run the second procedure)
    3) A SQL*Plus script could connect to the database, run the first procedure, use the HOST command to invoke the Perl script, and then call the second procedure.
    4) A Java stored procedure could call out to the operating system to invoke the Perl script and a PL/SQL procedure could then invoke procedure 1, this new Java stored procedure, and then procedure 2.
    5) (10g and later) You can call procedure 1, then create a one-time DBMS_SCHEDULER job that calls the perl script, then call procedure 2.
    Justin

  • UTL_DBWS support of the Secuity call to the Web Service.:

    I am invoking a webservice, by making use of the package URL_DBWS.INVOKE procedure.
    my request xml containss the security information as part of the request header.
    when i make a invoke call, i am getting the following error.:
    : Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: An error was discovered processing the <wsse:Security> header
    at "WIM210.UTL_DBWS",
    : at "WIM210.UTL_DBWS",
    : at line 68
    I am using the Oracle 11g, could any body tell me why is this error coming.

    The exeption we are getting is BEA-380000
    General runtime error: [Security:090477]Certificate chain received from XXX - 123.123.123.123 --> test.salesforce.com was not trusted causing SSL handshake failure.
    This is of course not relevant if the callout were using CONNECT. In the CONNECT scenario, OSB would not care about XXX's certificate.

  • [11g] increasing efforts for select xmlserialize(content(...))) into ... from dual

    I wonder, that i don't get any feedback here (please see below).
    Can somebody first just confirm this observation?
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production"
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    NLSRTL 11.2.0.3.0 Production
    Oracle Database 11g Enterprise Edition 11.2.0.3.0 64bit Production
    PL/SQL 11.2.0.3.0 Production
    TNS for Linux: 11.2.0.3.0 Production
    I recognized for my application, that there is an increasing efforts (in terms of time) for executing
    (in a pl/sql package procedure invoked by a BIU trigger)
    SELECT XMLSERIALIZE(CONTENT(p_xml_data)) INTO v_xml_clob FROM DUAL;
    Here is a little demo sqlplus script:
    create or replace package test_pkg
    as
           procedure check_xml(
             p_xml_data in out nocopy xmltype);
    end;
    create or replace package body test_pkg
    as
           procedure log(
             p_txt in varchar2)
           is
             ts     TIMESTAMP WITH TIME ZONE := systimestamp;
           begin
             dbms_output.put_line(to_char(ts, 'hhmiss.FF3') || ':' || p_txt);
           end;
           procedure check_xml(
             p_xml_data in out nocopy xmltype)
           is
             v_xml_clob CLOB;
             v_len NUMBER;
           begin
             log('check_xml(): enter');
             SELECT XMLSERIALIZE(CONTENT(p_xml_data)) INTO v_xml_clob FROM DUAL;
             log('  serialized');
             v_len := dbms_lob.getlength(v_xml_clob);
             log('check_xml(): done - length = #'  || v_len);
           exception
           when others then
               oerror_pkg.set_ora_error;
               raise;
           end;
    end;
    drop table test_table;
    create table test_table(
           tid number(19,0),
           data xmltype
    create or replace trigger BIU_TEST_TABLE
    before insert or update on test_Table
    for each row
    declare
    begin
       test_pkg.check_xml(:new.data);
    end;
    insert into test_table(tid, data)
    select ctr_tab.ctr, '<root><node>' || ctr_tab.ctr || '</node></root>'
    from (  SELECT LEVEL ctr
           FROM dual
           CONNECT BY LEVEL <= 200) ctr_tab;
    The output is going like this
    021543.204:check_xml(): enter
    021543.204:  serialized
    021543.204:check_xml(): done - length = #32
    021543.206:check_xml(): enter
    021543.206:  serialized
    021543.206:check_xml(): done - length = #32
    021543.207:check_xml(): enter
    021543.208:  serialized
    021543.208:check_xml(): done - length = #32
    021543.209:check_xml(): enter
    021543.210:  serialized
    021543.210:check_xml(): done - length = #32
    021543.211:check_xml(): enter
    021543.212:  serialized
    021543.212:check_xml(): done - length = #32
    021543.214:check_xml(): enter
    021543.214:  serialized
    021543.214:check_xml(): done - length = #32
    021549.625:check_xml(): enter
    021549.664:  serialized
    021549.665:check_xml(): done - length = #34
    021549.708:check_xml(): enter
    021549.746:  serialized
    021549.747:check_xml(): done - length = #34
    021549.791:check_xml(): enter
    021549.829:  serialized
    021549.830:check_xml(): done - length = #34
    021549.874:check_xml(): enter
    021549.912:  serialized
    021549.913:check_xml(): done - length = #34
    When i filter it with a little perl script to extract the efforts (xmlserialize / dbms_lob.getlength):
    0 / 0
    0 / 0
    1 / 0
    1 / 0
    1 / 0
    0 / 0
    0 / 0
    0 / 1
    1 / 0
    0 / 0
    0 / 1
    1 / 0
    0 / 0
    0 / 1
    1 / 0
    0 / 1
    0 / 1
    0 / 0
    0 / 1
    0 / 0
    0 / 1
    0 / 0
    1 / 0
    0 / 1
    0 / 0
    31 / 1
    31 / 1
    32 / 1
    32 / 1
    32 / 1
    33 / 0
    33 / 0
    34 / 1
    34 / 0
    34 / 1
    34 / 0
    34 / 1
    34 / 1
    35 / 1
    35 / 1
    36 / 0
    36 / 1
    36 / 1
    37 / 1
    37 / 0
    37 / 1
    38 / 0
    38 / 0
    39 / 1
    38 / 1
    38 / 1
    38 / 1
    Unfortunately i can't easily change the way the insert from select is done (legacy code not under my control)
    Can someone tell me, if there is a way starting with the trigger to avoid those increasing efforts?
    - many thanks!
    best regards,
    Frank

    [ Addendum - 24.01.2014:
      This only worked for the test/demo program. It didn't work for my application.
       For my application i really had to move the logic to the INSERT before the trigger
       - similar to the 3rd posting for my monologue(!) here.
    A little step further:
    I also don't have the problem if i expand the code of the PROCEDURE test_pkg.check_xml(...) directly into the trigger
    - instead of invoking the PROCEDURE in the trigger:
    create or replace package test_pkg
    as
           procedure log(
             p_txt in varchar2);
    end;
    create or replace package body test_pkg
    as
           procedure log(
             p_txt in varchar2)
           is
             ts     TIMESTAMP WITH TIME ZONE := systimestamp;
           begin
             dbms_output.put_line(to_char(ts, 'hhmiss.FF3') || ':' || p_txt);
           end;
    end;
    drop table test_table;
    create table test_table( 
           tid number(19,0),
           data xmltype
    create or replace trigger BIU_TEST_TABLE
    before insert or update on test_Table
    for each row
    declare
    begin 
      -- test_pkg.check_xml(:new.data);
           declare
             v_xml_clob CLOB;
             v_len NUMBER;
           begin
             test_pkg.log('check_xml(): enter');
             SELECT XMLSERIALIZE(CONTENT(:new.data)) INTO v_xml_clob FROM DUAL;
             test_pkg.log('  serialized');
             v_len := dbms_lob.getlength(v_xml_clob);
            test_pkg.log('check_xml(): done - length = #'  || v_len);
           exception
           when others then
               oerror_pkg.set_ora_error;
               raise;
           end;
       end; 
    insert into test_table(tid, data)
    select ctr_tab.ctr, '<root><node>' || ctr_tab.ctr || '</node></root>'
    from (  SELECT LEVEL ctr
           FROM dual
           CONNECT BY LEVEL <= 200) ctr_tab;
    -- rollback;
    That gives some hint.
    Does oracle have some problem / limit for invoking procedures (functions) from triggers?
    Or only if those use certain features?
    An issue about deterministic and re-entrance?
    Well, that boxes me into a corner.
    Because the single package procedure implements a functionality at a central place - i.e. a single central place to extend it or to fix it.
    If i now have to expand its content (like a macro) into the triggers of the respective table i am in trouble.
    Because those tables (and their triggers) are dynamically generated by a compiler tool of a c++ client.
    This means for extension and fixes i need to change, test, deliver and deploy a list of c++ client processes :-(
    Is there any way around?
    How can i inform oracle that the invocation of a PL/SQL procedure is functionally identically with expanding the PL/SQL functions code into the trigger?
    rgds,
    Frank

  • HTTP Adapter Interconnect 10.1.2 problem

    Hello,
    Can someone explain me how to use Interconnect for sending xml-messages from a database to a webservice, and processing the answer?
    We tried the following:
    Install a database adapter
    Install a (sync) http adapter
    The common view is a procedure basd on a DTD
    The database application has an invoke procedure
    The http application has the implemented procedure.
    The application view of the http application is a copy of the common view.
    This works for sending the message. Also, the http-response succeeds:
    In the http log we can see the content of the reply (in XML). However, after this, there's a complaint in the logging:
    Bridge successfully sent message from OAI to external system
    You must have data for KentekenAanvraag_reqKentekenAanvraag_OUT_OAI_V1_T:OAI/V1.VRTG-PER-VERZ.ALG-GEG.WACHT-WOORD-ACT in your XML according to the DTD which was imported in iStudio.
    Agent: ** Error ** Bridge had an error processing the received message.
    Indeed, there is no data sent back for this entry. Does this mean that the application view defines exactly what is expected? Are optional fields not permitted?
    Also, on the database-side, we get this error:
    OAI.Agent.syncRequest : ORA-20000: ORU-10023: error 3 on lock request
    I hope someone can give us a clue!
    Thanks,
    Monique

    hi,
    I am new to Interconnect stuff .We are trying use http adapter for Request and Reply.Could you please let me know how to approach ?Waht are the steps I have read the documentation but it's doesn't have a case study as the other adapters.
    Any help will be gratly appreciated.
    Thanks

Maybe you are looking for