Updating Sybase from Oracle trigger

Hi
I have 2 databases: Oracle 8i and Sybase, both with a identical schema (same tables).
An app will be updating the Oracle database, and I would like that automatically the Sybase database be updated accordingly, to keep them synchronized.
I am thinking about using java stored procedures and JDBC to access Sybase, that would be called from triggers. Is this possible? Where could I find some examples?
Thanks
Luis Cabral

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Swapnil:
I am writing a trigger on a table and need to update and insert data in some other table, but for some unknown reason I am not able to do this. I tried catching all the errors but find none as such.
This is the scenario...Consider Table A and Table B...the trigger is being written on Table A...On insert in table A, it should read table B and do some checks and update/insert in table B with the values fetched from table A. I have done it by writing a trigger on table A in which i read the table B and also update and insert in the Table B by referencing the values :new and :old from Table B(this is not mutating is it?? i dont get any mutating error), but this doesn't work....any ideas.suggestions are appreciated.....
Swapnil
[email protected]<HR></BLOCKQUOTE>
Use table A values as 'NEW' and table B values as 'OLD'.
null

Similar Messages

  • Problem installing Oracle Linux Release 5 Update 2 from Oracle e-Delivery

    Hello
    I have been trying to install Oracle Linux Release 5 Update 2 from Oracle e-Delivery so that I can install Oracle 11g express edition beta.
    Here are the steps that I took and the problem that I am having:
    1. I downloaded the file, unzipped the file twice, which gave me 3,042 files and 13 folders with the total size = 3.07 GB.
    2. I put in the DVD and restarted my PC hoping that my PC will boot from the DVD, but instead Window started.
    I reported this issue to tech support from e-Delivery, but they referred me to contact you. Please assist.
    Julia

    3,042 files and 13 folders with the total size = 3.07 GBWhich download .zip did you choose from edelivery? Under linux-x64 I peeked "Oracle Linux Release 5 Update 2 for x86_64 (64 Bit) - DVD" file V15099-01.zip downloaded, it has just the one .iso file. You'll need to burn that to DVD, but with burn s/w that handles ISO files.
    Also keep in mind you'll need 64 bit hardware (amd/intel 64? itanium? those are different), the only *nix platform I've got handy to try it out is -x86 :(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • For Update Query from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    you can't dynamically add a query to the data model in reports.
    You should look into the XML based customization of Oracle Reports. This will enable you to define a report dynamically by creating a definition in XML.
    Also another option is to have the report with a query in it and use lexical parameters in reports to pass the query definition or just the where part of it.
    Look at the reports online help for both of these solutions.

  • Fetch Insert / Update Query From Table Trigger

    Hi everyone !,
    I have a situation, is there any way where I can get insert/update query by before-insert / after insert trigger when a user inserts/updates any row in the table.
    Plz....help me....champs.....
    Regards,
    Naushad

    That was a nice thing but it works only on some oracle 9i with DML statements.
    On database versions 9.2.0.1 to 9.2.0.6 ora_sql_text works and returns the calling text for dml triggers, where as starting from 9.2.0.7 the behavior has changed and returns NULL.
    Cause
    This issue had surfaced from 9.2.0.7.0 patchset. After discussions in Bug 4171597 which was closed as a duplicate of Bug 4230721 it was concluded that it was the expected behavior i.e ORA_SQL_TXT should return null when dml triggers are used.
    ORA_SQL_TXT is a "System defined event attribute" and is supposed to work only with "System triggers". This is also what the Documentation says - "Application Developers Guide : Fundamentals(9.2)
    Chapter 16 Working with System events".
    Bye Alessandro

  • How to access data in sybase from oracle

    Can any one help me.
    I have a sybase database & i need some of the data of sybase database to be used by oracle database. How can i do that.

    Well, here's some instructions on setting up a link to an Excel spreadsheet via ODBC.
    http://asktom.oracle.com/pls/ask/f?p=4950:61:::::P61_ID:4406708207206#18830681837358
    I guess you'd just change the DSN to point to Sybase instead, and I think you have to change the username/password.
    Tak

  • Update jdk from Oracle 11g? (version is EOL)

    When does Oracle plan to update the jdk and jvm used in Oracle 11g stored procedures?
    Oracle 11g ships with java 1.5, which reached EOL in October, 2009.
    (See [http://www.oracle.com/technetwork/java/eol-135779.html] )
    Thus, the compiler and VM used to provide Java functionality in the Oracle Database are ~2.5 years beyond the era when they were officially supported.
    Edited by: 921895 on Mar 19, 2012 9:55 AM

    Currently , the java version in the database cannot be upgraded - this is being looked upon as a future option.
    OracleJVM Install and Upgrade FAQ [ID 825306.1]
    Possible to Upgrade JDK Classes Supplied with Database Version 8i-10g? [ID 342810.1]     
    HTH
    Srini

  • Oracle to Sybase from UNIX

    Can ve connect to Sybase from Oracle, where the Oracle runs on Unix by using Generic Connectivity?
    Thanks.

    Depends on which Unix platform your Oracle db is running.
    HSODBC needs to be installed on the same machine/directory where the Oracle DB is installed.
    For Oracle 9i hsodbc is available on Sun, AIX and HP; starting with 10g also on Linux.
    In addition you need a 3rd party ODBC driver to work with hsodbc; in your case an ODBC driver to Sybase.

  • Update/Insert records from Oracle to MySQL

    Hi team, 
    My application will insert/update records into Oracle database, I need to sync all of records into MySQL database.  I designed a package to load data from Oracle to MySQL, the Oracle database use OLE DB component and MySQL database use ADO.NET.
    How to insert new records into MySQL? If the old record exists, we also need to replace with new record. I did some research, someone suggest to create a stage table to handle this scenario, but I have 14 tables in this case. How to handle this scenario
    with high performance? 
    If there is anything unclear, please let me know. 
    Thank you in advance. 

    Finally, I created 14 tables as same as in our MySQL database system with prefix "updated" , they are use to store the updated records from Oracle system. All of new records we add a flag, the "1" means insert a new record into the system,
    and the "0" means we should updated. So, I can use the conditional split component to split all of new records. The new records insert into the target table and the updated records insert into the "updated_table". Finally, we can add a
    SQL Script task to run a update script to sync all of records. 
    I don't use Lookup Transformation because we must use Cache
    Transform transformation in this case, the Cache connection manager to save the data to a cache file (.caw), it will hard to
    trace the history data in the future.  
    In addition, I recommend to use ODBC connection if somebody face the similar scenario with me, there is a bug  if we use ADO.NET to
    load data from Oracle to MySQL by using SSIS. For more information, please refer the MSDN document: http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx
    @Arthur, thanks again for your input.  Have a nice day! :)

  • Using eclipse Web services to retrieve and update data to Oracle DB

    Hi,
    Can I have a sample about to use eclipse to retrieve/update data from Oracle DB by using axis web services?
    thank you

    Hi,
    If you have a sheet in Excel with data from a SharePoint Online list you can switch to the PowerPivot ribbon and ask to add it to the model. This will allow you to reference this table when you create a PowerView report.
    This workbook, with the Odata feed can then be refreshed via the scheduled refresh feature of Power BI Site.
    Insert the data using the Odata feed
    The Odata URL will be something like:
    https://MyCompany.sharepoint.com/MySite/MySubSite/_vti_bin/listdata.svc/MyList
    If you are not sure what is the list name, you can drop just browse to
    https://MyCompany.sharepoint.com/MySite/MySubSite/_vti_bin/listdata.svc and this will provide a list of all the lists in that site/sub-site.
    Once you have those in the model and you setup scheduled refresh, it will refresh the lists directly from SPO (using the owner identity)
    Hope this helps.
    Guy
    GALROY

  • Migrating from Sybase to Oracle - update() function

    In sybase i have an update function that let me know when an specific column id updated after and update statement, does Oracle have something similar??
    thanks.

    Hello <Please Supply Your Name>,
    Is this a system function or a user defined function?
    Without knowing the full details of what the Sybase "update" function is, there are 3 areas which might be worth investigating.
    1) Indentity columns and @@IDENTITY.
    Identity columns in Sybase are auto increment columns used mostly for ID's.
    @@IDENTITY is a global variable which holds the last updated/inserted identity value in the session your in.
    SQL Developer Migration Workbench can automatically migrate both of these.
    Identity column are converted to use an Oracle trigger and sequence.
    @@IDENTITY is replicated in a sqlserver_utilities package variable. (The identity trigger updates the value).
    2) Triggers
    If you are not using an identity column in Sybase. But would still like to "catch" a value being updated in your table, you should use a BEFORE/AFTER UPDATE trigger.
    You could save this value to a package variable if you wish (much like how we emulate the @@IDENTITY column above).
    3) Update Returning Clause
    This clause returns the result of an update statement.
    http://www.samoratech.com/PLSQL/swArtPLSQLReturn.htm
    I hope this helps
    Dermot.

  • Insert / Update from Oracle Forms -- URGENT Please thanks

    Hello All,
    I need to create form which can be use for two purposes. i.e insert and update
    I have one table called emp which has 50 columns.
    Only four columns has not null constraint.
    I need to insert values in only these columns.
    From SQLPLUS it can be cone as below:
    insert ito emp values ('333','2222','007','AA','01-JAN-2007','','','','','','','','','',........);
    After that I need to update one of the coulmn with the value as
    update emp
    set zipcode = 'Y'
    where empt# = 007;
    How could I achive this from Oracle form.
    Any help will be appricated.
    D

    Why handle updates in the On-Update trigger? Oracle Forms already handles this for you. You update a data value in a field and click on the SAVE button (assuming you have a Save button) and the Oracle Forms handles the Update. The On-Update trigger is provided so you can perform processing in addition to the default UPDATE.
    Craig...

  • For Update Query with Wait Clause from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    Why have you started another thread on the same thing?
    FOR UPDATE cursor is causing Blocking/ Dead Locking issues
    Just use one thread to avoid confusion.
    The fact that nobody has answered on the other thread for a couple of days could be to do with it being the weekend and most people are not at work.
    Either be patient or, if it's more "urgent" than that, raise a SR/Tar with Oracle metalink.

  • DATA EXTRACTION FROM ORACLE & SYBASE

    Hello members...
    Good day. This is my first posting in this site. I am new to Oracle and have a question regarding Data extraction from Oracle and Sybase.
    My project has two applications one having Oracle as the database and the other has Sybase as the database. On the proposed production schedule, there would be a interface data update from the Oracle database to the Sybase database.
    My aim is to check if the data update is in sync after the update. We plan to extract the data from the two databases (Oracle and Sybase) and compare in a Third Party tool. We have the tool to compare. Can any of you suggest a nice data extraction tool. I have to set this data extraction as a batch in the nightly batch schedule.
    Thanks in advance,
    Regards,
    Krishna Kumar...

    Sybase provides the best data extraction utility called BCP. You can load and extract data. It is very user friendly. From your unix prompt if you type in BCP ? you will all the switches and
    help messages you need to use. It is so simple.
    Oracle dosn't have such a utility to extract data from table.
    You need to write a Stored procedure and use UTF_FILE package to
    extract data from table and write into a file.

  • Update Existing Excel File from Oracle DB

    The user has an Excel Sheet that they populate manually.
    There is a application that pulls data from salesDB.
    Target : Eliminate the manual updating process of DB.
    Solution:
    1.Add a Button o VB .NET application like "Generate Report"
    2. Create DB connectivity to that Excel sheet and make it pull values from DB instead of manual entry
    So that button should produce an Excel document with updated fields reading from salesDB
    Questions
    1. Which solution is better?
    2. what would be the step by step approach for each solution ?
    3. Any link to articles that talk about Excel report generation from Oracle would be great.
    -- New to oracle

    Hello,
    if you need more than a simple csv file then you can find free tools at
    https://xml-spreadsheet.samplecode.oracle.com/ or
    https://exceldocumenttype.samplecode.oracle.com/
    While they both use a MS XML format they differ in the way they return the output file
    - write with utl_file (1)
    - return a CLOB (1 and 2)
    - directly to a web browser through a PL/SQL DAD (2)
    - via a user defined type (2)
    Regads
    Marcus

  • Importing table dump from oracle into sybase

    I was wondering if anyone has ever imported a table dump from oracle into sybase. I just tried it and it didn't work. I used TOAD to create my table dump file but when i imprted it into sybase using bcp in i got the following error
    cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
    CSLIB Message: - L0/O0/S0/N36/1/0:

    If you are looking for a basic/standard way to exchange data between Oracle and Sybase, use the CSV format.
    It is trivial to write a generic SQL*Plus script for Oracle to extract data from a table (or a SELECT) and spool this into a properly formatted CSV file.
    It is also just as easy to use Sybase Bulk Copy utility to load that CSV file into Sybase.
    There are also alternative methods. One would be to use Oracle's Heterogeneous Services. You can define a database link in Oracle that connects, via ODBC, to Sybase. And using this database link you can push (insert) data into Sybase.

Maybe you are looking for