Sybase to Oracle : Trancount

Hi,
BEGIN TRANSACTION in Sybase is handled by omwb_emulation package in Oracle. But the associated "RollBack Transaction" in Sybase is replaced to a ROLLBACK WORK in Oracle, which seems to be wrong. I feel that it should be "RollBack to somesavepoint" ?
Example:
################### SYBASE CODE #########################################
BEGIN TRANSACTION
SELECT @inscount = <somevalue>
SELECT @delcount = <somevalue>
IF @inscount = @delcount
BEGIN
DELETE xxx where <somecondition>;
SELECT @error_n = @@error
COMMIT TRANSACTION
END
ELSE
BEGIN
ROLLBACK TRANSACTION
END
END
################## ORACLE CODE BY OMWB ###############################
1 /* Emulating @@TRANCOUNT functionality in Oracle model */
2 BEGIN
3 OMWB_ARTIC.globalPkg.trancount:=OMWB_ARTIC.globalPkg.trancount+1;
4
5 PRC_ARCHIVE_KM_DATA.inscount := <some value>;
6 PRC_ARCHIVE_KM_DATA.delcount := <some value>;
7
8 IF PRC_ARCHIVE_KM_DATA.inscount = PRC_ARCHIVE_KM_DATA.delcount THEN
9 BEGIN
10 DELETE xxx
11 WHERE somecondition;
12
13 IF OMWB_ARTIC.globalPkg.trancount = 1 THEN
14 COMMIT WORK;
15 END IF;
16 IF OMWB_ARTIC.globalPkg.trancount > 0 THEN
17 OMWB_ARTIC.globalPkg.trancount:=OMWB_ARTIC.globalPkg.trancount-1;
18 END IF;
19
20 ELSE
21 BEGIN
22 OMWB_ARTIC.globalPkg.trancount:=0;
23 ROLLBACK WORK; <-----------------MY CONCERN is HERE
24 EXIT;
25 END;
I feel that a savepoint has to be defined at line 2 (like Savepoint abc), and the ROLLBACK WORK in line 23 has to change to ROLLBACK to abc.
Am I right ?
Please send it replies to [email protected]
Thanks and Regards,
Vikram

Hi,
Thanks for the feedback. We will review and make enhancement as appropriate.
Regards
John

Similar Messages

  • Sybase to Oracle 10g migration

    Hi, I have a task to perform Sybase to Oracle 10g conversion; can anybody recommend any documents or metalink docs to me?
    Thanks
    Gaurav

    If you have migration workbench related question you can post in Migration Workbench forum,
    Database and Application Migrations

  • GROUP BY clause diff in Sybase and Oracle

    Hi,
    I am migrating code from Sybase to Oracle and came across a strange issue which is widely known to others :)
    In Sybase , one can use columns or calculations in the SELECT expressions that don't appear
    in the GROUP BY clause of the query. Like
    SELECT order.custid,customer.name,MAX(payments)
    -> FROM order, customer
    -> WHERE order.custid = customer.custid
    -> GROUP BY order.custid;
    works fine but for SQL we need to add customer.name to GROUP BY clause.
    On the similar lines, here is my SQL query
    INSERT INTO GTT_CTRT_recalc_proc
    (id_fin_rec,
    id_imnt,
    id_instr_opn,
    dt_instr_opn,
    dt_opn,
    dt_cls_loanet,
    dt_prcss,
    am_invst)
    SELECT t1.id_fin_rec,
    t1.id_imnt,
    t1.id_instr_opn,
    t1.dt_instr_opn,
    t1.dt_opn,
    NVL(t1.dt_cls_loanet, l_dt_to),
    t1.dt_prcss,
    SUM(t2.am_invst) + (0.123 * (1 - abs(sign(0 - SUM(t2.am_invst)))))
    FROM GTT_CTRT_TEMP_recalc_process t1, GTT_CTRT_TEMP_recalc_process t2
    WHERE t2.id <= t1.id
    AND t2.id_imnt = t1.id_imnt
    AND t2.id_instr_opn = t1.id_instr_opn
    AND t2.dt_instr_opn = t1.dt_instr_opn
    GROUP BY t1.id_imnt,
    t1.id_instr_opn,
    t1.dt_instr_opn,
    t1.dt_opn,
    t1.dt_cls_loanet,
    t1.dt_prcss;
    Which does not have t1.id_fin_rec in GROUP BY failing it in SQL.
    I know that if I add this column in GROUP BY it will work fine but I am told to keep the functionality as it is as the result before and after adding the column would be diff of-course.
    Please guide me about what can be done in this situation and is there any work around for this?
    Thanks,
    Aashish

    That's a piece of nasty denormalisation. We shoudl also expect trouble we do stuff like that. Anyway, I think encapsulating the stuff from T2 into an inline view should sort you out....
    INSERT INTO GTT_CTRT_recalc_proc
    (id_fin_rec,
    id_imnt,
    id_instr_opn,
    dt_instr_opn,
    dt_opn,
    dt_cls_loanet,
    dt_prcss,
    am_invst)
    SELECT t1.id_fin_rec,
    t1.id_imnt,
    t1.id_instr_opn,
    t1.dt_instr_opn,
    t1.dt_opn,
    NVL(t1.dt_cls_loanet, l_dt_to),
    t1.dt_prcss,
    , t2.total
    FROM GTT_CTRT_TEMP_recalc_process t1
        , ( select id_imnt,
                    id_instr_opn,
                    dt_instr_opn,
                    SUM(am_invst) + (0.123 * (1 - abs(sign(0 - SUM(am_invst))))) AS total
            FROM GTT_CTRT_TEMP_recalc_process
           GROUP BY  id_imnt,
                           id_instr_opn,
                           dt_instr_opn ) t2
    WHERE t2.id <= t1.id
    AND t2.id_imnt = t1.id_imnt
    AND t2.id_instr_opn = t1.id_instr_opn
    AND t2.dt_instr_opn = t1.dt_instr_opn
    GROUP BY t1.id_imnt,
    t1.id_instr_opn,
    t1.dt_instr_opn,
    t1.dt_opn,
    t1.dt_cls_loanet,
    t1.dt_prcss;Cheers, APC
    blog: http://radiofreetooting.blogspot.com
    Edited by: APC on Mar 16, 2009 2:31 PM
    Forgot to include GROUP BY in the inline view

  • Migrate sybase to oracle 11G

    Hello,
    We have a customer that wants to migrate from sybase to Oracle 11g. I know you can migrate through SQL Developer but therefor you have to connect to the sybase database.
    If you may not connect to the sybase database, due to security reasons, is there another solution to migrate?
    For example take an export from sybase, get the dump file and import into Oracle? Or setup a replica sybase database and export/import the original sybase database and then migrate to Oracle?
    Many thanks.

    Yes there is. You can do an OFFLINE migration using SQL Developer.
    The offline migration using SQL Developer is based on scripts (generated by the SQL developer) that export mandatory information from the Sybase database, put that info into flat files which SQL Developer will then read in to collect the foreign database information and finally to create with that information the Oracle model.
    Same can be done for the data move which will then export all data from the tables you want to migrate and to import them using SQL*Loader.
    So get SQL Developer and then click on Tools -> Migration -> Create Database Migration Scripts, then choose Sybase database and if the Sybase admin wants to export the Sybase database information from a Unix or Windows based client. The tool will now create scripts for you that you can pass to the Sybase admin. Let him run them which will create 2 directories with a couple of data files in it. Let the Sybase admin now zip them and pass them to you to start the Offline migration.
    - Klaus

  • Transporting data between sybase and oracle

    I want to know how do you transport data from sybase to oracle. The table are created in sybase and we want to move
    everything over to Oracle8i

    I want to know how do you transport data from sybase to oracle. The table are created in sybase and we want to move
    everything over to Oracle8i .if sysbase has a facility to export the tables as comma separated text files, export them and then user sql *loader to load the data into oracle.
    you can check out oracle utilities documentation for sql *loader case studies.
    if there is a huge amount of data, you can try oracle trasnparent gateway for sybase. thank you..:>)

  • Going from Sybase to Oracle

    Hi.
    I'm kind of new at this, so please bear with me.
    We're moving from Sybase towards Oracle, and there we have a problem.
    I'd like to know if you have to change the way you make the Java SQL-queries, in order to make it work with Oracle DB's.
    Any help appreciated
    Thanx in advance
    /Mike
    null

    There is always a possibility that the jdbc syntax being used may have some "sybase specific" extension to the jdbc spec syntax.
    when you move the application from sybase to the oracle rdbms, some of these "sybase" extensions to the jdbc syntax may not work.
    assuming you're using rdbms 8.1.6 then you want to review any syntax issues you run into with the following java dcumentation :
    http://technet.oracle.com/doc/oracle8i_816/
    make sure you thoroughly test your applications.
    i hope thi9s helps ...
    null

  • Sybase to Oracle Migration

    Hi,
    My case is little bit different.I have Sybase Database and Oracle Database
    and I need to migrate from Sybase to Oracle but unfortunately both these servers are not connected .
    Please suggest how to do data verification.I was planning to use DMV.
    Regards
    Amit

    Amit,
    In this case you need to do a manual verification. You can do this in a number of ways. Essentially you issue the "same" SQL against Sybase and Oracle and compare the results.
    A simple check would be doing a count(*)
    A slightly more complex check might be doing a SUM function
    A more complex check could be issuing a complex SQL statement, that would validate further the integrity of the data, by including multiple columns within the query (i.e. as part of a where clause)
    Donal

  • Sybase to Oracle Data Conversion

    Whats the quickest way to move data from Sybase to Oracle ? What options are available ?
    Database objects (table ddls, procs, triggers - everything else is already in place in Oracle) - already provided by Vendor.
    Overview about the database :
    Datatype difference
    Sybase datetime converted to Oracle Timestamp
    Other datatypes are related
    int - int
    char - char
    varchar - varchar
    Timestamps are part of PK & FK in few tables.
    Approx 1000 tables to convert
    Some tables have 25- 75 million rows
    Thank you
    Yog

    Another approach you might like to try is to use the manual approach of data migration.. where underlying idea is to bcp out the data from Sybase and thereafter use sqlloader to load data into the oracle tables.. and if you happen tro use DIRECT=TRUE with sqlloader nothing better.... its really fast..
    sql developer would generate the bcp out script.. extract the scripts... run them on the sybase host ...move the dump files to oracle host... run the sqlloader scripts..
    AT our end 15G worth data migration took 1 day using sql developer but the manual approach would do the stuff in 3-4 hours.
    Anyway would like to put 1 issue I am facing..
    In sybase the datetime contains the values to the level of Milisecond whereas when it comes to date column in Oracle it is just to the level of seconds .. => that if there is a primary key sybase table column.. and this truncation at orale level would make the inserts to fail with duplication errors... any thoughts on how to overcome this problem....
    Thanks
    Praveen

  • Importing DB info from Sybase to Oracle 9i

    Could someone please tell me if it is possible to import a sybase db into oracle 9i. The reason, I need to be able to import and excisting DB from sybase to Oracle for a project.

    In your control file for SQL*Loader, specify the timestamp with format like "Mon DD yyy hh:mi:ss:ff3AM".

  • Migration help - Sybase to Oracle

    Hi,
    we are currently migration our applicaiton from Sybase to Oracle. Oracle version we are using is 8.1.7 for Windows.ok now here is problem,
    In order to update a table we compare more than 1 table, which we can specify in the "from clause of the update" in sybase, but oracle it does not allow this
    for Eg: ( In sybase )
    update table1 set
    activeFlag = 0,
    revId = revId + 1
    from table2, table3
    where table1.col1 = table2.col1
    and table1.col2 = table2.col2
    and table1.col3 = table3.col1
    I am running out of ideas to convert this statement to suitable Oracle syntax.Any help in the conversion will be greatly appreciated
    thanks
    vijay

    I'm not sure I understand what your statement would do in Sybase but perhaps this is what you are looking for?
    update table1 set
    activeFlag = 0,
    revId = revId + 1
    where exists (select null
    from table2, table3
    where table1.col1 = table2.col1
    and table1.col2 = table2.col2
    and table1.col3 = table3.col1)

  • Sybase to oracle

    how do we convert these to oracle ?
    New to oracle and assuming the decode will work, not sure how that works.
    #1
    convert(char(4) not null,(substring('0',1 - abs(sign(char_length(convert(varchar(4),RCRC_ID)) - 3)),1) + RCRC_ID)),
    #2
    In sybase
    where column_name > " "
    fetches everything greater than the ascii value for space
    Is it same in oracle ?
    Thank you

    Hi,
    The Oracle Migration Workbench supports migrations from Sybase to Oracle. We will have the latest version available from this web site in the coming weeks so watch this space.
    Re:- multiple text columns. We migrate these to CLOBs in Oracle.
    Regards
    John

  • Sybase to Oracle : do I have to use the Sybase account "sa" ?

    I'd like to migrate from Sybase to Oracle.
    The Sybase DBA's are reluctant to divulge the password to the account "sa".
    Is there any other account I can use ?
    If so, what privileges does it need ?
    ( In my version of Mig W'bench, the user id is greyed out in the login box )
    Thanks

    Hi Peter,
    this is something that we enforce in the Workbench in order to ensure that the migration will run without any hitches. We could allow you to change the user name but that may cause more trouble. At least with the sa user we have the ability to extract all the objects we need from the database.
    The workbench should not harm a database. It performs in a read only mode most of the time. The only time we actually modify a SQL Server database is when a user chooses to migrate their data via scripts. In this case we create views so that BCP can extract the DATETIME data accuratley. However, we remove these views once we are finished.
    Regards
    John

  • Perl Scripts in Sybase to oracle 8

    Wondering what type of libraries do I need to load onto my Sun
    OS and Perl system to make database calls to our new Oracle 8
    database system.
    Librabies to invoke?
    Sample Perl script calls?
    Thanks
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Oracle Migration Workbench Team:
    Mikael,
    The Oracle Migration Workbench migrates from Sybase to Oracle. For further information see http://technet.oracle.com/tech/migration .
    The Oracle Migration Workbench can be run on NT and use ODBC network connections to Sybase on (for example) solaris and Oracle sqlnet connections to Oracle on solaris.
    Turloch
    Oracle Migration Workbench Team<HR></BLOCKQUOTE>
    Thanks....
    Does The Oracle Migration Workbench migrate from Sybase ASE v.12?
    /Mikael

  • KM for Bulk loading from Sybase to Oracle

    Is there KM available for Bulk loading from Sybase to Oracle ?
    May be using Unix pipe, sybase fetch and Direct sqlloader.
    Anyone has some thoughts on this, appreciate your responses.

    Sample CTL generated by ODI.
    OPTIONS (
    ERRORS=0,
    DIRECT=TRUE
    LOAD DATA
    INFILE "/exp_imp/ODI_C_0ODI_TEST.bcp"
    BADFILE "/exp_imp/ODI_C_0ODI_TEST.bad"
    DISCARDFILE "/exp_imp/ODI_C_0ODI_TEST.dsc"
    DISCARDMAX 1
    INTO TABLE ODISYB_TEST.ODI_C_0ODI_TEST
    FIELDS TERMINATED BY 'M-,'
    C1_TEST_NO,
    C2_TEST_DESC,
    C3_TEST_TOKEN,
    C4_TEST_DATE
    Error on SQLLoader log file.
    Record 1: Rejected - Error on table ODISYB_TEST.ODI_C_0ODI_TEST, column C4_TEST_DATE.
    ORA-01858: a non-numeric character was found where a numeric was expected

  • Problem while migrating from Sybase to Oracle using Quick Migrate

    Hi,
    For SQL Developer version 2.1, while migrating from sybase to oracle, Using Quick migrate, during data move step, for the rows having ''(Blank) values in TEXT data type in SYBASE, which is convertd to CLOB in Oracle, the migration for that table terminates at that row.
    However, NULL values in Sybase TEXT data type are successfully inserted in Oracle CLOB.
    How can we overcome this?

    reproduced and see exception in console, bug logged.
    Edited by: Jade Zhong on Feb 1, 2010 6:10 PM

Maybe you are looking for

  • Internal error when person doing people search has matching name as search query

    I'm trying to find a solution for peculiar problem in our SP 2010 people search. We get this error  Internal server error exception: System.Threading.ThreadAbortException: Thread was being aborted.    at Microsoft.SharePoint.WebPartPages.DataFormWebP

  • Convert pdf to .wps

    Here's some fun....I want to convert an online application form in pdf to a 'fillable' form and I only have .wps on home computer.  ??

  • LinkElement become NOT clickable when it scroll out of TextArea view

    Hi: I am writing a online call center product with flash builder 4.5. I found a tricky problem with LinkElement. I use the TextArea as the display stage for each incoming and outgoing message. Obviously, the messages includes image and href. I use Li

  • Com.sun.xml.tree.XmlDocument;

    Is there any class with that name, where can I find it? N.B. I already installed jaxp and include it in the classpath Ramzi

  • Reg: The Drop down in Adobe form

    Hi All,        I am using a Adobe form [PDF] with 2 Drop Down's say DD1 [values:1,2,3] and DD2 [values a,b,c], Requirment is: When i select a value say "1" in DD1, DD2 should be "readOnly" and value should  be "a" only. When any value other then "1"