Oracle 11.2 PL-SQL Language Reference - NOCOPY Example 8–17

Hello,
The following is from the Oracle PL/SQL reference, page 8-19:
In Example 8–17, the procedure has an IN OUT NOCOPY formal parameter, to which it assigns the value 'aardvark'.
The anonymous block assigns the value 'aardwolf' to a global variable and then passes the global variable to the procedure.
If the compiler obeys the NOCOPY hint, then the final value of the global variable is 'aardvark'.
If the compiler ignores the NOCOPY hint, then the final value of the global variable is 'aardwolf'.
DECLARE
    TYPE Definition IS RECORD (word VARCHAR2(20),meaning VARCHAR2(200));
    TYPE Dictionary IS VARRAY(2000) OF Definition;
    lexicon Dictionary := Dictionary(); -- global variable
    PROCEDURE add_entry (word_list IN OUT NOCOPY Dictionary -- formal NOCOPY parameter)
    IS
    BEGIN
        word_list(1).word := 'aardvark';
    END;
BEGIN
    lexicon.EXTEND;
    lexicon(1).word := 'aardwolf';
    add_entry(lexicon); -- global variable is actual parameter
    DBMS_OUTPUT.PUT_LINE(lexicon(1).word);
END;
Result:
aardvarkI am confused. I would expect the output to be aardvark regardless of whether NOCOPY was obeyed or not. To test this, I removed the NOCOPY hint and as expected the output was the same. Of course, it should
be the same, because you're saying: "I'm going to pass you a variable that you can change inside the program, so I expect the actual parameter passed to reflect that change outside of the program".
NOCOPY doesn't change that, does it?
What am I missing?
Thanks,
Jason

The difference will show up if, rather than returning successfully from your procedure after setting the variable, an exception is raised instead. Without NOCOPY, the assigned value will be "rolled back"; with it, it is not.
DECLARE
    TYPE Definition IS RECORD (word VARCHAR2(20),meaning VARCHAR2(200));
    TYPE Dictionary IS VARRAY(2000) OF Definition;
    lexicon Dictionary := Dictionary(); -- global variable
    PROCEDURE add_entry (word_list IN OUT NOCOPY Dictionary) -- formal NOCOPY parameter)
    IS
    BEGIN
        word_list(1).word := 'aardvark';
        raise no_data_found;
    END;
BEGIN
    lexicon.EXTEND;
    lexicon(1).word := 'aardwolf';
    begin
      add_entry(lexicon); -- global variable is actual parameter
    exception
    when others then
      null;
    end;
    DBMS_OUTPUT.PUT_LINE(lexicon(1).word);
END;
aardvark
PL/SQL procedure successfully completed.
DECLARE
    TYPE Definition IS RECORD (word VARCHAR2(20),meaning VARCHAR2(200));
    TYPE Dictionary IS VARRAY(2000) OF Definition;
    lexicon Dictionary := Dictionary(); -- global variable
    PROCEDURE add_entry (word_list IN OUT /*NOCOPY*/ Dictionary) -- formal NOCOPY parameter)
    IS
    BEGIN
        word_list(1).word := 'aardvark';
        raise no_data_found;
    END;
BEGIN
    lexicon.EXTEND;
    lexicon(1).word := 'aardwolf';
    begin
      add_entry(lexicon); -- global variable is actual parameter
    exception
    when others then
      null;
    end;
    DBMS_OUTPUT.PUT_LINE(lexicon(1).word);
END;
aardwolf
PL/SQL procedure successfully completed.Gerard
Edited by: gaverill on Apr 26, 2013 2:05 PM

Similar Messages

  • Error in PL/SQL Language Reference .... could be that possible ?

    I use Oracle 10g ....... but when I used that function in :-
    Oracle® Database
    PL/SQL Language Reference
    11g Release 1 (11.1)
    B28370-02
    September 2007
    page 252
    CREATE OR REPLACE FUNCTION compute_bonus (emp_id NUMBER, bonus NUMBER)
    RETURN NUMBER
    IS
    emp_sal NUMBER;
    BEGIN
    SELECT salary INTO emp_sal
    FROM employees
    WHERE employee_id = emp_id;
    RETURN emp_sal + bonus;
    END compute_bonus;
    The following equivalent SELECT statements invoke the PL/SQL subprogram in
    Example 8–5 using positional, named, and mixed notation:
    SELECT compute_bonus(120, 50) FROM DUAL; -- positional
    SELECT compute_bonus(bonus => 50, emp_id => 120) FROM DUAL; -- named
    SELECT compute_bonus(120, bonus => 50) FROM DUAL; -- mixed
    ====================================
    and than executed first select statement ..... it pass successfully
    but in second and third select ...... I found this errors :-
    SQL> SELECT compute_bonus(120, 50) FROM DUAL;
    COMPUTE_BONUS(120,50)
    8050
    SQL> SELECT compute_bonus(bonus => 50, emp_id => 120) FROM DUAL;
    SELECT compute_bonus(bonus => 50, emp_id => 120) FROM DUAL
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    SQL> SELECT compute_bonus(120, bonus => 50) FROM DUAL;
    SELECT compute_bonus(120, bonus => 50) FROM DUAL
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    is there any relation between that I use oracle 10g and those errors ???
    or the code wrote wrong in oracle reference 11g ( I hope not ) ???

    yes, you are correct. the "what's new" section of the 11g pl/sql manual states
    "Before Release 11.1, a SQL statement that invoked a PL/SQL subprogram had to specify the actual parameters in positional notation. As of Release 11.1, named and mixed notation are also allowed. This improves usability when a SQL statement invokes a PL/SQL subprogram that has many defaulted parameters, and few of the actual parameters must differ from their default values."

  • Oracle 9i Support for multi language is not working.. Giving question mark

    HI,
    We have an application which uses oracle 9i as the database. Riight now we are supporting only english and there is a requirement to support multiple languages like korean, chineese and japaneese.
    But we are planning to migrate one part of the application to support multi languages. Means it may affect around 10 tables but with huge data. Totally we have around 100 tables.
    How to enable the database for supporting multiple langugages.?
    Is there any way to enable only the few tables supporting multiple languages. Because if we change the database level parameters for supporting languages, we may need to migrate entire tables. this will be a huge task.
    Even if want to set the parameters for supporting multiple languages.. how to set it. Is it possible set it in the existing database or do we need to re-create the table with these prameters.
    I have read in some documentation, that we can create table columns with nVarchar2 for supporting multi languages. I have created it. but if i copy some other language characters into those columns, it is giving question mark.
    Is it possible to do search using text in native langugage like chineese..
    Could somebody guide me on the above clarificationa and what would be the best approach..
    Thanks in advance
    Jino
    Regards,
    Jino George
    Ext: 6520

    You should not use any more Oracle 9.0.1 but at least Oracle 9.2.0.8 to get some extended support if you really cannot upgrade to 10g.
    I don't have any Oracle 9.x database available but I've run successfully following test with Oracle 10.2.0.1 in character mode under Linux:
    oracle@pbell:~$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    oracle@pbell:~$ sqlplus / @nls
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Aug 29 17:29:56 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> drop table t;
    Table dropped.
    SQL> select * from v$nls_parameters where parameter like '%SET%';
    PARAMETER
    VALUE
    NLS_CHARACTERSET
    WE8ISO8859P1
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    SQL> create table t ( data nvarchar2(100));
    Table created.
    SQL> insert into t values(unistr('\76EE\7684\5730'));
    1 row created.
    SQL> select * from t;
    DATA
    目的地Try to make sure you have the right NLS_LANG setting on the client side (under Windows this is a registry setting).

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • Search option using a new small window in oracle forms using pl/sql

    Hai Friend,
    Iam Navya Jeevan,regarding Oracle Forms and Reports Doubts.
    Our project is developed using Forms and Reports
    In Forms for triggers we are using Pl/SQl language.
    DOUBT
    IN a form we require an option like search button when we press the search button a small window must be opened.This window should contain details from database(ie an entire column of database,must be displayed in the window ) and the user selects the value from the window.
    If u got any sample code related to this subject please mail to me.
    ....................................VERY URGENT............................................................................
    thankyou,

    Hello,
    The LOV is made for this.
    Francois

  • SQL language change in 11g?

    Is anyone aware of any changes to SQL language with Oracle 11g, from 10g? We have recently upgraded a database from 10g to 11g. A Microsoft Access database we are using has a large amount of SQL pass-thru queries, and we are having trouble with it now, since the Oracle database has been upgraded to 11g, particularly with "Invalid Use of Null" error message, though no code has been changed. We have also upgraded our Oracle client to the 11g Full-client, and changed the driver name in the scripts to reflect this. We've had luck connecting to the 11g database in other manners (i.e., import external data > ODBC sources).
    Edited by: Barry on Aug 9, 2011 7:16 AM
    Edited by: Barry on Aug 9, 2011 9:34 AM

    The VBA script, within Microsoft Access 2007, runs up to this SQL script, though strangely even if I comment out the "Is Null" statements:
    strSQL = "SELECT DISTINCT IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"") AS AQ_CODE, qsptLOCATION.AQUIFER_CODE, qsptLOCATION.LOC_CODE, qsptLOCATION.CLASS, IIf([tblWellInfo]![CP_TBL_V]=""POC"",""Compliance"",IIf([tblWellInfo]![CP_TBL_V]=""POE"",""Exposure"","""")) AS DESIGNATION, IIf(clng(tblWellInfo.SEG_SCR) > 1,""M"","""") AS MULTI_LEVEL, tblWellInfo.PROPERTY INTO tbl_LOCATION " & _
    "FROM qsptLOCATION INNER JOIN tblWellInfo ON qsptLOCATION.LOC_CODE = tblWellInfo.WELL_ID " & _
    "WHERE (((IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'PER*' Or (IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'OGA*') " & _
    "AND ((qsptLOCATION.LOC_CODE) Not Like '*-F' And (qsptLOCATION.LOC_CODE) Not Like 'FPOP*' And (qsptLOCATION.LOC_CODE) Not Like 'OSO*' And (qsptLOCATION.LOC_CODE) Not Like '*GAL') " & _
    "AND ((qsptLOCATION.CLASS) Is Null) AND ((qsptLOCATION.DESCRIPT) Is Null)) OR (((IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'PER*' " & _
    "Or (IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'OGA*') " & _
    "AND ((qsptLOCATION.LOC_CODE) Not Like '*-F' And (qsptLOCATION.LOC_CODE) Not Like 'FPOP*' And (qsptLOCATION.LOC_CODE) Not Like 'OSO*' And (qsptLOCATION.LOC_CODE) Not Like '*GAL') " & _
    "AND ((qsptLOCATION.CLASS) Is Null) AND ((qsptLOCATION.DESCRIPT) Not Like '*RENAMED*')) " & _
    "OR (((IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'PER*' Or (IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'OGA*') " & _
    "AND ((qsptLOCATION.LOC_CODE) Not Like '*-F' And (qsptLOCATION.LOC_CODE) Not Like 'FPOP*' And (qsptLOCATION.LOC_CODE) Not Like 'OSO*' And (qsptLOCATION.LOC_CODE) Not Like '*GAL') " & _
    "AND ((qsptLOCATION.CLASS) Not In ('PR','AW','IB','PV','IJ')) AND ((qsptLOCATION.DESCRIPT) Is Null)) OR (((IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'PER*' Or " & _
    "(IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala"")) Like 'OGA*') " & _
    "AND ((qsptLOCATION.LOC_CODE) Not Like '*-F' And (qsptLOCATION.LOC_CODE) Not Like 'FPOP*' And (qsptLOCATION.LOC_CODE) Not Like 'OSO*' And (qsptLOCATION.LOC_CODE) Not Like '*GAL') " & _
    "AND ((qsptLOCATION.CLASS) Not In ('PR','AW','IB','PV','IJ')) AND ((qsptLOCATION.DESCRIPT) Not Like '*RENAMED*')) " & _
    "ORDER BY IIf(qsptLOCATION.AQUIFER_CODE Like 'PER*',""Perched"",""Ogallala""), qsptLOCATION.LOC_CODE;"
    CurrentDb.Execute strSQL
    Edited by: Barry on Aug 9, 2011 11:50 AM

  • How to create an Oracle DATABASE through Java Programming Language.. ?

    How to create an Oracle DATABASE through Java Programming Language.. ?

    Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
    In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
    So a certain amount of manual installation will always be required.
    Typically you would supply the SQL scripts, and a detailled installation document too.
    regards,
    Owen

  • What is the best way to practice SQL language?

    I’m new in database world and want to practice SQL language. I’ve been playing around with Oracle XE, but I realized it’s not very practical to play around with SQL using XE since its sql editor is not user friendly to debug the script. I’m trying to build schemas from scratch and play around with it using SQL. What is the best way to do this?
    Thanks in advance

    Valerie Debonair wrote:
    I’m new in database world and want to practice SQL language. I’ve been playing around with Oracle XE, but I realized it’s not very practical to play around with SQL using XE since its sql editor is not user friendly to debug the script. I do not think that is a valid criticism at all. The basic tools needed to learn SQL is SQL*Plus and a willingness to learn.
    There is no "+debugging+" for SQL either... except to break it into simpler steps, testing that... and perhaps using "+explain plan+" to get the execution plan.
    Granted that SQL*Plus is not the best tool for displaying data... but then learning SQL should be done using small data sets (not too many columns and few rows) - as even a small data set can represent all the data model complexities needed for learning SQL.
    The examples you use, the test tables and the practical exercises used in the learning process are by far more important how "pretty" the tool being used is.
    FWIW, I do 99% of all my SQL work and PL/SQL development using SQL*Plus - it is a very capable tool.

  • Does Oracle 9i Lite supports Thai language?

    We are developing mobile application[residing in a laptop] using java and Oracle 9i lite version [Release 5.0.2]. The application has English and Thai version. After we upload all the data[thai and english phrases] to Oracle lite from server [residing in Sun Solaris, Oracle 91] we were able to see the Thai characters in mobile, but for some phrases there is an extra English character amended to the phrase. We are not doing any char conversion here, just collecting the data from server and inserting to lite version DB.
    Entries in polite.ini are,
    [All Databases]
    DatabaseID=501
    DataDirectory=C:\oracle\ora90\Mobile\Sdk\OLDB40
    NLS_LOCALE=ENGLISH
    MessageFile=C:\oracle\ora90\Mobile\Sdk\BIN\OLITE40.MSB
    DBCharEncoding=Native
    When i ran through the release document for Oracle9i Lite Release 5.0.2, i can relalize that it is not supporting Thai language. Correct me if i am wrong.
    Did any of the latest Lite version supports Thai language. How about 10g? Or any alternatives is there in Release 5.0.2 itself.
    Thanks and looking forward for your reply.
    Best Regards,
    Muthu

    Hello,
    I am not sure to understand your question.
    Oracle Lite is a SQL Database , and you can access it from Oracle Application Server using the correct JDBC driver and then use the JSP Tag libs to access the data (JSTL SQL) or any JDBC API in J2EE.
    If I am not answering your question please add more details about what you are trying to achieve...
    Regards
    Tugdual Grall

  • SQL Query Reference?

    Hi..:)
    Need some advise on any Oracle Sql query reference..
    I use to do mysql development with reference to mysqlhelp.chm
    Is there any equivalent standalone help reference available for oracle.
    Thank you

    For Oracle 9i release 2,
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm
    For Oracle 10g release 1,
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/toc.htm

  • IS IT POSSIBLE TO INVOKE AN ORACLE ALERT FROM PL\SQL ?

    Is it possible to invoke an Oracle Alert from PL\SQL and, if so, could you
    provide me with some references to any relevant notes that you may have on
    Metalink ?

    If you want to fire an Alert programatically the best way is to define a Business Event that will fire a notification. The Notification Emailer (if running) will convert this into an email.
    Notifications are preferable to Alerts because you can use HTML for formatting.

  • Supplied PL/SQL Package Reference

    Hello all,
    who can me give the link to the oracle-documentation "Oracle8i Supplied PL/SQL Packages Reference"?
    Thanks.
    Regards
    Sandra Koenig

    easy to find at http://tahiti.oracle.com
    plsql

  • PL/SQL Toolkit reference manual

    Could you please provide me with the URL for accessing the PL/SQL Tookit reference manual?
    Thanks.

    http://otn.oracle.com/docs/products/ias/doc_library/1022doc_otn/apps.102/a90099/toc.htm
    good luck

  • Oracle 8i to MS SQL Server replication

    Im new to Oracle, but a MS SQL Server DBA. Im helping in the architecture of a data warehouse that pulls from some disparate sources, including Oracle 8i, into a SQL Server 2000 box. We could use batch processing to pull updated data from the Oracle database to populate our data warehouse, but we were hoping to get real-time transactional processing via some replication scenario. My terminology may be wrong from the Oracle perspective, but I think the transactional replication that SQL Server supports is called synchronous replication in Oracle. My question is, does anybody know how to do synchronous replication from an Oracle server to a SQL Server? Or perhaps which Oracle product supports it? Thanks!
    null

    ===========================================================
    I'm working on the similar requirements, exactly my source DB is DB2, and the target DB is Oracle. I have two year experience with Oracle, but I know nothing about DB2. There a about 50 tables in source DB. Transactions on source DB is not too heavy(less than 10/Second), and the mainfram are all powerful.
    I've though about Oracle Gateway, but I'd rather save it as the backup solution. For one thing, neither co-workers nor I have experience with it. Second, I'm afraid the Gateway performance would not be satisfactory. Furthermore, words has it that we should pay for the Gateway. So My ideas to real-time replication of the two DB is as following:
    (1) use trigger in DB2 to reponse to immediate transactions in source DB;
    (2) use Embedded C/SQL to extract those transactions into flat files;
    (3) FTP files to the target server;
    (4) On target server, SHELL scripts read the files and call Pro*C to apply the transactions into Oracle DB.
    but, some problems really get me.
    A: in step(1) and (2), How to set EC to do its work in reponse to trigger? I know that one can call host script in Oracle trigger, but I have no idea about DB2 trigger. Maybe, I can create a real-time monitoring EC process to address it. what's your opinion?
    B: I should maintain all transaction metadata by myself. e.g. INSERT, UPDATE old/new data, DELETE info. It is originally covered by the database, and it isn't easy to handle it squarely.
    C: How to address some exception? like database rollback, the process recovery in case of any interruptions in the above steps.
    Could you share me some idea, Thank you!
    eilison
    [email protected]

  • Connect Oracle Reports to Ms Sql Server DB

    Is it possilbe to Connect Oracle Reports to Microsoft Sql Server database. If yes then how. Please advice.
    Thanks
    Sami.

    It is possible to connect Oracle database to MS Sql server database using the Oracle Transparent Gateway for MS SQL Server.
    You can use the following links to configure such connection:
    Oracle Transparent Gateways - General Description - Part I
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateways-general.html
    Oracle Transparent Gateway for MS SQL Server - Part II
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateway-for-ms-sql_16.html
    Aviad

Maybe you are looking for

  • IPhone Bugs, Flaws & Wishlist (ADD YOURS TO LIST!!)

    iPhone Bugs, Flaws & Wishlist -AT&T’s EDGE cellular network: "excruciatingly slow" -Making calls can be a 6 step process if phone is off. -halfway decent internal speakers for listening if you set the thing down -iPod games are not compatible with iP

  • Errors with Scripted Fill

    this is a question-i seem to be haveing problems with my PS-CC WHEN I GO TO THE FILL BOX AND TRY TO GET A TREE OR FRAME I GET ERRORS SOMETHING ABOUT WIDGETS NOT WORKING AND I ALSO GET THIS SORT OF THING IN AUTOMATE/CAN I RELOAD A NEW PHOTOSHOPcc and

  • About Word 8 and importing into InDesign

    Hi, I have been using Word 8 to write the first draft of a book which I then "place" into Indesign for more elaborate page work. There is one thing that does not work well for me and perhaps there is a solution to that, Here it is: In the work I have

  • Changing of Stock Transport Order

    How can I find out who changed a Stock Transport Order, and on which date it was chaged.

  • How to update iphone on a different computer

    I am trying to update my girlfriends iPhone on my iTunes on ym mac. How do I do this without he rlosing any of her stuff. I simply want to perform a software update only.