Procedure Overloading on 10g

Hi. We migrated from Oracle 9.2.0.7 and currently using Oracle 10.2.0.3.0 (development server). We have the following existing package:
PACKAGE PKG_ADMIN
FUNCTION A (p_emp_id IN NUMBER,
p_emp_type IN NUMBER)
BEGIN
RETURN ('ABC');
END;
FUNCTION A (p_emp_id IN NUMBER,
p_address_id IN NUMBER,
p_country_id IN NUMBER)
BEGIN
RETURN ('XYZ');
END;
The first function A is the only one declared in the package spec since it's set to public while the 2nd one is private. With 10g, what happens is when I run
PKG_ADMIN.A (vemp.emp_id, vemp.address_id, vemp.couontry_id) --assuming part of a pl/sql block
it gives me 'ABC' and not 'XYZ'. Is this a bug in 10g or does 10g modified the rules for procedure overloading or is there a problem with my code? This code is returning the right value under the 9i db (production server).
If there's anyone who can help, I'd appreciate it. Thanks!

This is the only part of the code that calls the function (which calls the overloaded function). Even if I paste the entire script, this will only be the part that would make sense. I modified "fnc_is_decoder_valid" with "fnc_is_valid" because that was what I mentioned earlier where I used representations. I apologize for the mix ups.
Please allow me to start all over again...I am pasting the actual codes
-- package spec
CREATE OR REPLACE PACKAGE dbpk_signal_admin AS
FUNCTION fnc_is_decoder_valid (
p_ad_rec IN affiliate_decoders%ROWTYPE
RETURN BOOLEAN;
FUNCTION fnc_right_length_for_decoder (
p_unit_address IN affiliate_decoder_uas.unit_address%TYPE
, p_decoder_id IN affiliate_decoder_uas.decoder_id%TYPE
, p_log_number IN affiliate_decoder_uas.log_number%TYPE
, p_feed_code IN affiliate_decoder_uas.feed_code%TYPE
RETURN BOOLEAN;
END dbpk_signal_admin;
-- package body
CREATE OR REPLACE PACKAGE BODY dbpk_signal_admin AS
FUNCTION fnc_right_length_for_decoder (
p_unit_address IN affiliate_decoder_uas.unit_address%TYPE
, p_decoder_id IN affiliate_decoder_uas.decoder_id%TYPE
, p_log_number IN affiliate_decoder_uas.log_number%TYPE
, p_feed_code IN affiliate_decoder_uas.feed_code%TYPE
RETURN BOOLEAN IS
l_retval BOOLEAN := FALSE;
l_max_len PLS_INTEGER;
BEGIN
SELECT DISTINCT adcr.ua_length
INTO l_max_len
FROM affiliate_decoder_check_refs adcr
, affiliate_decoders ade
WHERE adcr.decoder_type_id = ade.decoder_type_id
AND ade.decoder_id = p_decoder_id
AND adcr.log_number = p_log_number
AND adcr.feed_code = p_feed_code
AND adcr.active_ind = 'Y'
AND adcr.ua_length = LENGTH ( p_unit_address );
l_retval := ( LENGTH ( p_unit_address ) = l_max_len );
RETURN l_retval;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
dbpk_common.prc_raise_validation_error
( 'The network feed is not valid with this decoder type.' );
WHEN OTHERS
THEN
RETURN FALSE;
END fnc_right_length_for_decoder;
FUNCTION fnc_right_length_for_decoder (
p_unit_address IN affiliate_decoders.base_unit_address%TYPE
, p_decoder_type_id IN affiliate_decoders.decoder_type_id%TYPE
RETURN BOOLEAN IS
l_retval BOOLEAN := FALSE;
l_max_len PLS_INTEGER;
CURSOR l_adcr_cur IS
SELECT adcr.ua_length
FROM affiliate_decoder_check_refs adcr
WHERE adcr.decoder_type_id = p_decoder_type_id
AND adcr.ua_length = LENGTH ( p_unit_address );
BEGIN
OPEN l_adcr_cur;
FETCH l_adcr_cur
INTO l_max_len;
l_retVal := l_adcr_cur%FOUND;
CLOSE l_adcr_cur;
RETURN l_retval;
END fnc_right_length_for_decoder;
FUNCTION fnc_is_decoder_valid (
p_ad_rec IN affiliate_decoders%ROWTYPE
RETURN BOOLEAN IS
l_retval BOOLEAN := TRUE;
BEGIN
IF NOT fnc_is_decoder_internal ( p_ad_rec.decoder_id )
THEN
IF NOT fnc_has_valid_ua_characters ( p_ad_rec.base_unit_address )
THEN
dbpk_common.prc_raise_validation_error
( 'Invalid format for base unit address' );
ELSIF NOT fnc_right_length_for_decoder ( p_ad_rec.base_unit_address
, p_ad_rec.decoder_type_id )
THEN
dbpk_common.prc_raise_validation_error
( 'Invalid Base Unit Address length for Decoder Type' );
END IF;
prc_check_mixed_signals ( p_ad_rec.decoder_id );
prc_check_missing_dem_groups ( p_ad_rec.decoder_id );
prc_check_max_ua_rules ( p_ad_rec.decoder_id
, p_ad_rec.decoder_type_id );
prc_check_dupe_ua_in_core ( p_ad_rec.decoder_id
, p_ad_rec.base_unit_address );
prc_check_dupe_ua_in_spcl ( p_ad_rec.base_unit_address );
END IF;
RETURN l_retval;
EXCEPTION
WHEN dbpk_constants.e_ams_validation_failure
THEN
RAISE;
WHEN OTHERS
THEN
dbpk_common.prc_raise_validation_error
( 'Error in fnc_is_decoder_valid: '
|| SQLERRM );
END fnc_is_decoder_valid;
My concern is, why is it that when it is used this way (sql plus and forms), it gives the correct error message.
1 DECLARE
2 l_decoders_rec affiliate_decoders%ROWTYPE;
3 BEGIN
4 SELECT 92438 AS decoder_id
5 ,5429 AS headend_id
6 ,14 AS transponder
7 ,1 AS satellite_id
8 ,3 AS decoder_type_id
9 ,null AS base_unit_address
10 ,null AS who_updated
11 ,null AS when_updated
12 INTO l_decoders_rec
13 FROM dual;
14 IF dbpk_signal_admin.fnc_is_decoder_valid (l_decoders_rec) THEN
15 DBMS_OUTPUT.PUT_LINE ('No error');
16 ELSE
17 DBMS_OUTPUT.PUT_LINE ('Error');
18 END IF;
19* END;
SQL> /
DECLARE
ERROR at line 1:
ORA-20101: Invalid Base Unit Address length for Decoder Type
ORA-06512: at "AFFMKTG.DBPK_SIGNAL_ADMIN", line 1128
ORA-06512: at line 14
Using the same records, the conversion script gives a different message
407 IF l_hd_log_rec.decoder_id > 0 AND
408 l_hd_rec.decoder_type_id IS NOT NULL AND
409 l_hd_rec.base_unit_address IS NOT NULL -- past runs > 0
410 THEN -- grid data has already been inserted into affiliate_decoders
411 l_marker_str := 'MARK 90 : ';
412 /*SELECT l_hd_log_rec.decoder_id AS decoder_id
413 ,l_hd_rec.headend_id AS headend_id
414 ,l_transponder_str AS transponder
415 ,l_satellite_id_num AS satellite_id
416 ,l_hd_rec.decoder_type_id AS decoder_type_id
417 ,l_hd_rec.base_unit_address AS base_unit_address
418 ,null AS who_updated
419 ,null AS when_updated
420 INTO l_decoders_rec
421 FROM dual; */
422 SELECT 92438 AS decoder_id
423 ,5429 AS headend_id
424 ,14 AS transponder
425 ,1 AS satellite_id
426 ,3 AS decoder_type_id
427 ,'0000314556567' AS base_unit_address
428 ,null AS who_updated
429 ,null AS when_updated
430 INTO l_decoders_rec
431 FROM dual;
432 --DBMS_OUTPUT.PUT_LINE(l_hd_rec.hd_simulcast_launch_id||'*'||l_hd_rec.unit_address||'*'||
433 -- validate decoder
434 IF dbpk_signal_admin.fnc_is_decoder_valid (l_decoders_rec) AND
435 l_hd_rec.base_unit_address IS NOT NULL THEN
436 UPDATE affiliate_decoders afd
437 SET headend_id = l_hd_rec.headend_id
438 ,transponder = l_transponder_str
439 ,satellite_id = l_satellite_id_num
440 ,decoder_type_id = l_hd_rec.decoder_type_id
441 ,base_unit_address = l_hd_rec.base_unit_address
442 WHERE afd.decoder_id = l_hd_log_rec.decoder_id;
443 l_add_decoder_ind := 'U';
444 ELSE
445 l_add_decoder_ind := 'E';
446 END IF;
447 ELSIF l_hd_log_rec.decoder_id IS NULL AND -- first run
448 l_hd_rec.decoder_type_id > 0 AND
449 l_hd_rec.base_unit_address IS NOT NULL
450 THEN
451 l_marker_str := 'MARK 95 : ';
452 -- decoder_id
453 SELECT affiliate_decoders_seq.NEXTVAL
454 INTO l_decoder_id_num
455 FROM dual;
456 SELECT l_decoder_id_num AS decoder_id
457 ,l_hd_rec.headend_id AS headend_id
458 ,l_transponder_str AS transponder
459 ,l_satellite_id_num AS satellite_id
460 ,l_hd_rec.decoder_type_id AS decoder_type_id
461 ,l_hd_rec.base_unit_address AS base_unit_address
462 ,user AS who_updated
463 ,sysdate AS when_updated
464 INTO l_decoders_rec
465 FROM dual;
466 -- create decoders when valid - AFFILIATE_DECODERS
467 IF dbpk_signal_admin.fnc_is_decoder_valid (l_decoders_rec) THEN
468 INSERT INTO affiliate_decoders (DECODER_ID, HEADEND_ID, TRANSPONDER
469 ,SATELLITE_ID, DECODER_TYPE_ID, BASE_UNIT_ADDRESS)
470 VALUES (l_decoder_id_num, l_hd_rec.headend_id, l_transponder_str
471 ,l_satellite_id_num, l_hd_rec.decoder_type_id, l_hd_rec.base_unit_address);
472 l_add_decoder_ind := 'I';
473 ELSE
474 l_add_decoder_ind := 'E';
475 END IF;
476 ELSE -- decoder_type_id is null
477 l_marker_str := 'MARK 96 : ';
478 l_add_decoder_ind := 'E';
479 END IF; -- l_hd_log_rec.decoder_id > 0
759 EXCEPTION
760 WHEN dbpk_constants.e_ams_validation_failure
761 THEN
762 ROLLBACK;
763 RAISE;
764 WHEN OTHERS
765 THEN
766 ROLLBACK;
767 dbpk_common.prc_raise_validation_error
768 ( 'Error in hd grid: ' ||l_marker_str|| SQLERRM );
769* END;
770 /
ERROR at line 1:
ORA-20101: The network feed is not valid with this decoder type.
ORA-06512: at line 763
I hope this makes more sense...Thanks!

Similar Messages

  • How to verify stored procedures in Oracle 10g.

    I would like to locate default stored procedure in Oracle 10g database.
    And Suggest which stored procedure can be converted in to JAVA code ??

    If the Java part of the question refers to looking for potential to speed up your stored procedures:
    You should consider native compilation which transfers your code to shared libraries which are bound to the DB kernel.
    In this case however consider, that this does not make any sense/improvement for pure data access statements but only for procedures consisting of complex algorithmic processing.
    For details refer to
    [How native compilation works|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2280]
    and
    [Setting Up and Testing PL/SQL Native Compilation|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2309]

  • Batch procedure in Forms 10g, calling rdf and send by mail

    Hi all,
    I need your advice regarding my task: i have a table with invoices of some clients. I have created a report in Oracle Reports 10g R2, so to have a pdf with all the data from this table.
    I have created a form in Forms 10g R2, displaying in a screen one field, where the user can choose the date of invoice. Then i will query by that date all my invoices in that table, and then i want to create a procedure in Forms, so that for every line in that table with the invoice date just chosen i will run HOST(rwrun ... all my parameters).
    My questions:
    1. I need to read some more about how to create a custom xml so to pass to my rwrun, and depending on the records fetched in my cursors in Forms 10g, i will pass a xml variable to my reports, so i will get the data from Forms 10g in the report created in Oracle Reports 10g. Is there any way that i can grep the errors? I need to create some insertions based on succes on failure, how can i accomplish this?
    2. Is the above described scenario way to complicated to loop throuh a cursor, create a pdf, and mail the pdf until the cursor is totally fetched? Do you recommend me a simpler way to accomplish this task?
    Thank you so much,
    Michael.

    Hello,
    I have a report with all my clients, with their email addresses in the same report. Each client as unique account number or invoice number.
    So i want to burst and distribute each invoice to the corresponding client:
    1. I have set REPEAT ON: INVOICE in oracle reports.
    2. From Oracle Reports, i click on Distribution list, and in the DESNAME i type email_address (which is the column from the table with the invoices).
    3. Then, File >> Distribute. Says: distribution completed succesfully, but nothing happens.
    Question:
    1. Where am i mistaking?
    2. Is there any log activity file that i could see what the application is doing, step by step?
    Thank you,
    Michael

  • Stored Procedure Concurrency Problem 10g

    dear all,
    Please any one could help on this my problem is appreciated.......
    i'm generating ticket numbers using stored procedure as below .
    i need to know followings .....(i'm using oracle 10g)
    1 .Does oracle stored procedure handle concurrency by default or does db manage concurrency when we using sps or do we have handle concurrency inside a stored procedure?
    2.when i generating ticket no using this stored procedure is there any concurrency issue when 100 clients are access it concurrently???
    3. Is there issue or bug in my java code??????????
    4.I have already used select for update statement but when i used that in db rowlocks are hanging and db become stuck .........
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme for update;
    5. and in my where clause i pass branch and scheme eg:SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE =
    xscheme;
    when i run this sp oracle return the error 'more than one row return by query'
    but when run query seperately it will return exactly one row for same brach code and scheme code no duplicates.
    why this happen and it also happen to update statement it will ignore branch code and update for all schemes
    UPDATE SERIAL_TAB SET serial_no=newSerial WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    what should i do ? sorry for my long question since i'm in deep trouble.....................
    could any one can help please................................
    in my java code i use transaction and setAutoCommit(false) when calling this sp
    public String getTicketNo(String br,String sch){
    //getconnection
    //setAutoCommit(False);
    //call sp get return value ;
    //commit;
    //if error rollback transaction
    create or replace PROCEDURE sp_generate_ticket (
    xbranch in varchar,
    xscheme in varchar ,
    xresult OUT VARCHAR
    ) AS
    BEGIN
    newSerial:=0;
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    newSerial:=newSerial+1;
    UPDATE SERIAL_TAB SET serial_no=newSerial WHERE BR_CODE=xbranch AND SCH_CODE = xscheme;
    --- do other operations -------------------------------------------------------------------------------------
    END;
    Best Regards,
    Pradeep.
    Edited by: user8958520 on Jan 1, 2012 10:02 PM

    user8958520 wrote:
    i need to know followings .....(i'm using oracle 10g)
    1 .Does oracle stored procedure handle concurrency by default or does db manage concurrency when we using sps or do we have handle concurrency inside a stored procedure?Oracle is a multi-user and multi-process system. It supports concurrency. It also requires the developer to design and write "+thread safe+" code. Its concurrency cannot address and fix design flaws in application code.
    2.when i generating ticket no using this stored procedure is there any concurrency issue when 100 clients are access it concurrently???That depends entirely on WHAT that procedure code does. And whether that code is thread safe.
    4.I have already used select for update statement but when i used that in db rowlocks are hanging and db become stuck .........
    SELECT serial_no into newSerial FROM SERIAL_TAB WHERE BR_CODE=xbranch AND SCH_CODE = xscheme for update;Horrible and utterly flawed approach. This forces serialisation. This means if that procedure is call by a 100 clients, only a SINGLE client can be serviced at a time. ALL OTHERS need to queue and WAIT.
    Serialisation kills database performance.
    What you have is a serious design flaw. Not an Oracle issue. And there is no magic solution to make this flawed approach work in a performant and scalable manner. This flaw introduces artificial contention. This flaw enforces serialisation. This flaw means that your application code WILL step on its own toes time and time again.
    The proper solution is to fix this design flaw - and not use poorly conceived procedures such as sp_generate_ticket that violates fundamental concurrency principles.

  • Insert and update same record of table using store procedure in oracle 10g

    Hi,
    I am using oracle sql developer for this.
    I have created Store procedure which run after every 30mins of interval.
    the problem is Ii need to insert data for first time of day then later that same record should update for particular field(here its plan code).
    if new field is coming (if new plan code is generated) then it should insert data and again update same for interval.
    means for each plan individual record(i.e. plan wise summary) should be there for only a day. next day new record for same plan.

    Hi,
    You should use Merge like shown below:-
    Merge into original_table a
    using second_table b
    on (a.primary_key=b.primary_key and a.primary_key........)
    when match then
    update set column_list=b.column_list
    when not match then
    isert into (column list)
    values(a.column_list)If you dont know much about merge then follow below link..
    http://www.oracle-developer.net/display.php?id=203
    http://www.oracle-base.com/articles/10g/merge-enhancements-10g.php

  • How to execute a procedure on OAS 10g release 3

    Hi,
    1 - I installed OAS 10G, and Oracle 10g, but I don´t know what the path to execute a html procedure(htp.p('hi')...etc), the installer say that Oracle HTTP Server was installed in http://server:80/, but I try and I have a page not found...
    Tks.

    How I make sure that I can access static HTML??
    I read the documentation and created dad but not yet he functions, now I receive the message
    Service Temporarily Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Oracle-Application-Server-10g/10.1.3.0.0 Oracle-HTTP-Server Server at araga Port 80
    this is the dad
    # ============================================================================
    # mod_plsql DAD Configuration File
    # ============================================================================
    # 1. Please refer to dads.README for a description of this file
    # ============================================================================
    # Note: This file should typically be included in your plsql.conf file with
    # the "include" directive.
    # Hint: You can look at some sample DADs in the dads.README file
    # ============================================================================
    <Location /plsqlapp>
    SetHandler pls_handler
    Order deny,allow
    Allow from all
    AllowOverride None
    PlsqlDatabaseUsername scott
    PlsqlDatabasePassword tiger1
    PlsqlDatabaseConnectString orcl
    PlsqlAuthenticationMode SingleSignOn
    PlsqlDefaultPage scott.home
    PlsqlDocumentTablename scott.wwdoc_document
    PlsqlDocumentPath docs
    PlsqlDocumentProcedure scott.wwdoc_process.process_download
    </Location>
    What´s still wrong
    if a try tnsping orcl, its ok.

  • Deploying SQLJ classes as Java Stored Procedures using JDeveloper 10g

    Hello,
    I have defined a SQLJ class, MwaSqljDao.sqlj, in JDeveloper. When I right click on the SQLJ class and "make" the class. It appears to succeed.
    However when I attempt to build the project in which the SQLJ class is a member of, a class that uses the SQLJ class has the following compile error:
    - MwaSqljDao not found.
    After a little digging it appears JDeveloper is able to compile the .sqlj file to a .java file in the classes output directory. However it does not take it to the next step of compiling the .java file into a .class file.
    Is SQLJ still a main stream Oracle technology? Or has it been cast to way side to make way for other technology?
    If SQLJ is still a supported Oracle technology how do go about compiling the SQLJ class using JDeveloper?
    My goal is to deploy SQLJ into JServer as a Java Stored Procedure class.
    Thank you,
    Rob

    Excellent.
    Especially that you resolved it and even more so that you posted the solution.
    I do wonder whether you would have gotten help (faster) has you asked in a JDeveloper-related forum such as " Forum Home » Developer Tools » JDeveloper and ADF" at JDeveloper and ADF

  • Auto-increment  identity column through procedure in oracle 10g on windows

    Hi,
    I need identity primary key which should be auto increment before while inserting data into table.
    for this i had use sequence and then trigger to increment it.
    but now i need to increment it in Procedure, while my procedure is having code to insert data in same table which has primary key

    Hi,
    SNEHA RK wrote:
    Hi,
    I need identity primary key which should be auto increment before while inserting data into table.
    for this i had use sequence and then trigger to increment it.Right. Some database products have auto-increment columns, and they are really handy. Unfortunately, Oracle does not have auto-increment columns. A sequence is an auto-increment object, and it's the right way to automatically generate unique identifiers, but you need to explicity reference the sequence, either in you DML statements, or in a trigger that will automatically fire before a DML statement.
    but now i need to increment it in Procedure, while my procedure is having code to insert data in same table which has primary keyAre you saying that you need to increment the sequence, completely aside from INSERTing into the table?
    If so, just reference sequence_name.NEXTVAL wherever you want to. In PL/SQL, you can say
    SELECT  sequence_name.NEXTVAL
    INTO    number_variable
    FROM    dual;This works in any version of Oracle, but starting in Oracle 11, you also have the option of referencing te sequence without using dual, or any other table.
    I hope this answers your question.
    If not, post a complete script that people can run to re-create the problem and test their ideas.
    For example:
    -- Here are the table and the seqauence that I created:
    CREATE TABLE table_x ...
    CREATE SEQUENCE ...
    -- Here is the BEFORE INSERT trigger I wrote:
    CREATE OR REPLACE TRIGGER ...
    -- The trigger works exactly how I want it to in statements like this:
    INSERT INTO table_x ...
    -- So there are no problems (that I know of) with anything up to this point.
    -- Now I want to use the same sequence to ...
    -- so that when I execute a statement like this
    -- then the next time  I add a new row to the orginal table, like this
    INSERT INTO table_x ...
    -- then the contents of table_x should be ... because ...

  • How to introspect a Stored Procedure in BPm 10g

    Could some give points on how to introspect the Stored procedure from BPM

    Hi,
    I hope you must have created DB connection in External Resources (Workspace).
    So Now create one module in catalog component called DBTables, right click on the module -> New -> Catalog Component -> SQL Query -> Select the DB connection that you created earlier -> select the schema, now you can see all the procedure, tables, function that are defined in your schema.Click on the procedure that you want to import to your workspace and click on finish. The procedure will be imported to your workspace.
    Hope the above will help you.
    Bibhu
    Edited by: Bibhuti Bhusan on Jul 14, 2011 10:44 PM

  • Calling Stored Procedure Using OSB 10g R3

    Hi Guys,
    I wanted to know what is the best way to call a Stored Proc from OSB 10 g R3.
    I am using MS SQL 2005 server.

    The DB Adapter does, in fact, support SQL Server in 10.1.3.x. The adapter configuration wizard does not support SQL Server so a command-line utility is necessary in order to generate the BPEL artifacts (XSD and WSDL). Once the artifacts are created, it is very easy to create a partner link to a SQL Server stored procedure. The adapter runtime has no restrictions beyond what is stated in the documentation. Note that the wizard will support SQL Server in 11g.

  • Oracle Back end job procedure and forms 10g

    Hi friends,
    I have to insert employee joining date into "B_join" Table from "Emp" table , with Flag of "IN" (inserted) after 10 Min the Flag has to be changed "VA"(validated), for this i have to create oracle job in the backend, before
    1)shoud i need to create procedure which is inserting data into "B_join" table?
    2)the same procedure i have to use it in the job procedure?
    3) i have to show Message to the Manager in the forms as "Hello Sir tomorow is joning of emp1,emp2,emp3,,emp4.......( list extends as per empployee).
    advice me
    Thanks and Regards
    VeeKay

    Hi friends i have created this procedure
    CREATE OR REPLACE PROCEDURE sms_insert1 is
    CURSOR c_update
    IS
    SELECT *
    FROM emp
    WHERE TO_CHAR (dob, 'ddmm') = TO_CHAR (TRUNC (SYSDATE + 1), 'dmm');
    r_update c_update%ROWTYPE;
    m_emp_cpr NUMBER (9);
    BEGIN
    FOR r_update IN c_update
    LOOP
    INSERT INTO b_join VALUES ('10000001',
    r_update.emp_name,
    'EN',
    r_update.emp_cpr_id);
    EXIT WHEN c_update%NOTFOUND;
    END LOOP;
    commit;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    dbms_output.put_line ('NO employees joining is tommorow');
    dbms_output.put_line ('NO employees joining is tommorow');
    WHEN OTHERS
    THEN
    dbms_output.put_line ('recheck the employee details');
    END;
    I have to insert employee joining date into "B_join" Table from "Emp" table , with Flag of "IN" (inserted) after 10 Min the Flag has to be changed "VA"(validated), for this i have to create oracle job in the backend.
    I have run Scheduled Job
    BEGIN
    Dbms_Scheduler.create_job(
         job_name     => 'DEMO_INSERT_NEW'
         ,job_type     => 'STORED_PROCEDURE'
         ,job_action     => 'SMS_INSERT'
         ,start_date     => SYSDATE
         ,repeat_interval => 'FREQ=MINUTELY'
         ,enabled     => TRUE
         ,comments     => 'JOINING DETAILS INSERT.');
    END;
    LATER I HAVE RUN THIS PROCEDURE ALSO
    SQL> EXEC DBMS_LOCK.SLEEP (10)
    data is not inserted in to the table
    and how do i change the flag "IN" to "VA" in the table?
    shall put the procedure in DB Trigger?

  • Creating procedure in express 10g

    I'm new to express and Oracle. I want to create procedures so I can write reports using the procedures so the general structure as best as I can figure from what I've read is I specify one or more variables for input and one or more variables for output.
    I've tried first to create a simple procedure called DEPTLIST. I go to object browser/create procedure. I put in p_deptid in number and DEPARTMENT_ID out varchar2 for the arguments. For the "define" part I put in:
    select DEPARTMENT_NAME FROM DEPARTMENT
    WHERE DEPARTMENT_ID = p_deptid;
    When I click next, I see a green check mark. I copied the sql and this is it:
    create or replace procedure "DEPTLIST"
    (p_deptid IN NUMBER,
    department_name OUT VARCHAR2)
    is
    begin
    select DEPARTMENT_NAME FROM DEPARTMENT
    WHERE DEPARTMENT_ID = p_deptid;
    end;
    Seeing the green check mark, I think the syntax is okay. I click "Finish". The next screen comes up with menu items code, dependencies, errors and grants. Code is highlighted but I don't see any code in the window below. If I click on errors I see this:
    6     29     PL/SQL: ORA-00942: table or view does not exist
    6     1     PL/SQL: SQL Statement ignored
    Regarding the table or view error, I'm assuming that I'm in the correct database. I logged on as HR so I would be in the sample database. If I go to the sql section and to query builder, I see the list of tables that I believe are in the HR database - countries, departments, employees, etc.
    Can someone suggest what I'm doing wrong? And after I'm able to create the procedure, where do I test it? Is there a way to be able to just type in sql rather than use the query builder? Is the syntax to test the procedure, "execute DEPTLIST(10)". 10 is the id of one of the departments.
    Thanks,
    Dan D.

    I've created the procedure with no errors but now how can I test it? When I logon as HR and go to the querybuilder, I don't see any procedures to select so that I can execute them. Is there a way to bypass the querybuilder and type in the statement? Is the statement to test the procedure as follows: execute DEPTLIST5(10) where 10 is the department_id. Here is the procedure:
    create or replace procedure "DEPTLIST5"
    (p_deptid IN NUMBER,
    p_deptname OUT VARCHAR2)
    is
    begin
    SELECT DEPARTMENT_NAME INTO p_deptname
    FROM DEPARTMENTS WHERE DEPARTMENT_ID = p_deptid;
    end;
    I'm trying to use the procedure from sql server reporting services. I'm able to connect as the hr user but when I try to use the procedure I get this error:
    TITLE: Microsoft Report Designer
    An error occurred while executing the query.
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'DEPTLIST5'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ADDITIONAL INFORMATION:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'DEPTLIST5'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    (System.Data.OracleClient)

  • Executing Procedure in SQL SERVER and Storing the results in Oracle 10g

    Hello,
    I am trying execute SQL SERVER procedure from Oracle 10g and store the results in a oracle table. When I tried executing the procedure i am getting errors.
    I am using Oracle Heteroeneous Services.
    Steps I followed.
    1. Created ODBC DSN on Oracle Server connecting to SQL SERVER database.
    2. Created Listner entry and TNSNAMES entries.
    3. Created Database link and able to select the data from the SQL SERVER tables.
    Here is the code i tried to execute the procedure.
    BEGIN
    "META"."extract"@abc;
    END;
    "META"."extract"@abc;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'META.extract@ABC' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Please help me.
    Thank You,
    Seshadri Thope

    Hi thopevs,
    Can you please tell me the right syntax of calling procedures(on sql server) from oracle?
    I am getting following error:
    SQL> execute "GetdateSys"@oratosql;
    begin "GetdateSys"@oratosql; end;
    ORA-06550: line 2, column 7:
    PLS-00201: identifier 'GetdateSys@ORATOSQL' must be declared
    ORA-06550: line 2, column 7:
    PL/SQL: Statement ignored
    SQL>
    Your help will be highly appreciated.
    Thanks & Regards,
    M.U.N.A

  • Forms 10g hangs while running a procedure which has got lot of loops

    Hi,
    When executing a procedure in Forms 10g which fetches millions of records, application getting stuck.
    What parameter is required to be changed in forms configuration?
    Can any1 help me out???
    Thanks in advance,
    Natz.

    Particularly this passage:
    MaxBlockTime
    MaxBlockTime is the time in mili seconds to wait when reading data from the
    Runform process.
    e.g. a long query, lots of complex processing
    (default = 1000 milli sec)
    /j2EE/OC4J_BI_Forms/application/forms90app/forms90web/WEB-INF/web.xml
    or
    /j2EE/OC4J_BI_Forms/application/formsapp/formsweb/WEB-INF/web.xml
    Example
    =======
    <servlet>
    <servlet-name>l90servlet</servlet-name>
    <servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
    <init-param>
    <param-name>maxBlockTime</param-name>
    <param-value>1800000</param-value>
    </init-param>
    </servlet>
    or
    <servlet>
    <servlet-name>lservlet</servlet-name>
    <servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
    <init-param>
    <param-name>maxBlockTime</param-name>
    <param-value>1800000</param-value>
    </init-param>
    </servlet>
    What happens?
    =============
    For long requests (like querying a big table), the Listener
    Servlet waits for a default time of 1 second for the Forms
    runtime process to complete the request
    If the request is not completed then the Listener Servlet sends a busy
    response to the client asking the client to retry.
    The client sends a retry zero content length request to check if the query is
    complete.
    This default time of 1 second can be configured using Listener Servlet
    parameter called maxBlockTime
    Reference
    =========
    Note 218846.1 How to increase Heap size in OC4J in V2
    Francois

  • ORA-06553: PLS-908 when calling 10g remote procedure from 11g database

    Hi,
    I have 2 instances: 11g (11.1.0.7) and 10g (10.2.0.4). When I try to call 10g (remote) procedure from 11g database, there is errors:
    ORA-04052: error occurred when looking up remote object CUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK
    ORA-06541: PL/SQL: compilation error - compilation aborted
    ORA-06553: PLS-908: The stored format ofCUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK is not supported...
    But, if I call the same procedure from another 10g instance, it's OK.
    How can I fix the problem?
    Thx,
    qtpham

    As you can see ,it seems like the workaround that was mentioned there is currently the only way to remove this ORA.
    Workaround: Remove the function call(s) from the called subroutine's
                package's spec.

Maybe you are looking for

  • How do I change the iCloud account on my iPhone on iOS 7?

    I previously changed my Apple ID to a new email address (so it was the same account, just a new ID). However, on my phone it still shows the old Apple ID. Under iCloud in the settings app the Apple ID is greyed out, so I cannot change it. When I try

  • Bloggie corruption

    Had bloggie for only 1(one) week and has corrupted all my video. Used memory card recover to recover video, BUT the video is corrupted and will not play with ANY video player. What a P.O.S. Anybody else had this problem????????????? Solved! Go to Sol

  • G/L open items upload

    Dear All,    i am uploading G/L open items, but here some gl master tax code is required, and some or selected as "post automatically" check box , in this case how can i proceed... Suresh patipati.

  • Output type not trigerring Automatically for inbound delivery

    Hi all We have created a custom output type for Delivery idoc processing ZPOD copy of OPOD and maintained all the settings also condition record for the same has been maintained. But when we are creating inbound delivery the output type ZPOD is not c

  • Duplication of a template with a unique changing element

    As part of audiobook creation disc labels are created.  A master template is created for the general format and then adapted for each unique title.  However, most titles have multiple CDs (up to 30 or 40 discs).  Need to find a way to carry every ele