Converting DB2 DDL

We have a DDL script generated from DB2 on a mainframe. I know OMWB doesn't support DB2 390 directly, but can it convert the generated DDL into Oracle format?
If not is there some tool that can do this?

Is there some application tied to this DDL? If there is a migration vendor who is remediating that code then the should have some tool to also address the DDL.

Similar Messages

  • Import DB2 DDL

    Can Oracle 9i import DB2 DDL or DB2 data file?
    Thank in advances.

    DB2 DDL may or may not be compatible with Oracle. There is a SQL standard which both databases conform to which specifies SQL syntax, but each database is likely to implement functionality beyond the base standard. If the DB2 DDL uses any but the most basic DDL, it's likely to need some minor modifications at least to run on Oracle.
    Oracle provides the Migration Workbench which should be able to convert a DB2 database to Oracle.
    Justin

  • How to convert oracle DDL to mysql DDL

    Dear friends,
    I have Oracle 9.2.0 DDL, (not complexity, no BLOB or CLOB data type, but have foreign key constrains), I want to convert it to mysql DDL, so I can create mysql database using this DDL. could someone give a hint of how to convert it? thank you very much in advance!
    besides, could some one tell me if I can get oracle 9.2.0 DDL through JDBC? how?
    thanks again!

    Hi Sammy,
    I'm not sure what you're looking for when you say you'd like to retrieve Oracle DDL. Would you like to know the table definitions (e.g., table names with associated column names and types)? I think java.sql.DatabaseMetaData might be able to help you out if that's what you mean.
    I usually just go into SQL*Plus and ask Oracle to describe the tables I need. But perhaps I'm not understanding you.
    Yes, I think it's best combine XDoclet and Hibernate. I've been adding XDoclet javadoc tags to my Java classes. There's an Ant task that generates the *.hbm.xml descriptor files for all my classes. There's another Ant task that will take those descriptors and put out the DLL for you. You can change from Oracle to MySQL just by changing the hibernate.properties file.
    I agree - Hibernate is terrific stuff. I hope it can help you. Sincerely, MOD

  • Converting DB2 stored procedure to Oracle?

    I need a little help with a problem I ran across this week. I have an existing DB2 Stored procedure that calls a COBOL program. (See the procedure below). Now, I need to convert this DB2 to an Oracle Stored Procedure. I need the procedure to call the same COBOL program that this DB2 procedure does. Is it possible in Oracle? Do I need to write a Java wrapper class instead? Please help!!
    CREATE PROCEDURE CO_CASEINFORMATION (
    IN PARM1 CHAR(006) FOR SBCS DATA CCSID EBCDIC ,
    IN PARM2 CHAR(018) FOR SBCS DATA CCSID EBCDIC ,
    IN PARM3 CHAR(004) FOR SBCS DATA CCSID EBCDIC ,
    IN PARM4 CHAR(008) FOR SBCS DATA CCSID EBCDIC ,
    IN PARM5 CHAR(026) FOR SBCS DATA CCSID EBCDIC
    LANGUAGE COBOL
    EXTERNAL NAME COSP183
    COLLID CACSDEV9
    PARAMETER STYLE GENERAL
    NOT DETERMINISTIC
    MODIFIES SQL DATA
    WLM ENVIRONMENT CACSDEV9
    STAY RESIDENT YES
    RESULT SETS 01
    ;

    Although I've never done that with COBOL, the documentation says it is possible to call an external COBOL procedure from within Oracle, without a Java wrapper class.
    The way to do it is to rebuild your COBOL program with the Pro*COBOL pre-compiler.
    Read the Pro*COBOL Programmer's Guide for more details.

  • Converting db2 user defined functions to oracle .

    Hi gurus
    this is a user defined function for getting current timestamp for a null value how to do this in oracle .i am getting a problem at the input values.can anyone suggest me the changes to convert it into oracle udfs.
    drop function Get_DateId()
    CREATE FUNCTION Get_DateId()
    RETURNS BIGINT
    BEGIN ATOMIC
    DECLARE      R BIGINT;
    DECLARE      v_Day CHAR(2);
    DECLARE      v_Month CHAR(2);
    DECLARE      v_Year CHAR(4);
         SET V_Day     = SUBSTR( DIGITS (DAY(CURRENT DATE)),9);
         SET V_Month     = SUBSTR( DIGITS (MONTH(CURRENT DATE)),9);
         SET V_Year     = RTRIM(CHAR(YEAR(CURRENT DATE)));
         SET R= BIGINT(v_Year||V_Month||V_Day|| '00000000' );
    RETURN R ;
    END
    @

    You'll need to get the syntax for PL/SQL function calls right. You will need something like
    create or replace function whatever( arg datatype, arg datatype...) return varchar2 is
      --define any local variables here
    begin
       return to_number(to_char(systimestamp,'the edit mask you want to use'));
    end;
    /You might do the conversion inline and dispense with the function compeletly if you're just generating a value.

  • Migrate DB2 on an IBM OS390 VM/CMS mainframe to Oracle on NT

    The migration workbench documentation indicates that DB2 on an AS/400 can be converted to Oracle on NT. Has anyone attempted to convert DB2 on an IBM OS390 to Oracle on NT?
    Also, the workbench documentation indicates that stored procedures are not converted from DB2 to Oracle, but they are for Sybase and Informix. Is this true? If so, why doesn't the workbench convert DB2 stored procedures?

    Hi David,
    the latest version of the Migration Workbench (Version 2.0.2.0.0) supports the migration of DB2\400 V4R3 and V4R5 databases to
    Oracle. The Workbench does not currently support migrations from DB2 on the OS\390 and there are no plans to
    provide this through a migration workbench plugin in the short term. The next version of the Workbench, due out in July,
    will support the migration of DB2 UDB v6 and v7 (certified on the MS Windows platform).
    Currently, none of the DB2 Workbench plugins support the migration of parsable objects i.e. stored procedures, triggers,
    etc.. This capability may be added in future releases of the Workbench depending on the demand. Again, there are no
    immediate plans to include a parser with the DB2 plugins.
    If you would like to provide us with any input on what parser capabilities you would like to see in the DB2 plugins (i.e. a
    parser for a certain language?) then we would be delighted to recieve your information.
    I hope this information is of help,
    Tom - Team OMWB.

  • Use of Oracle Designer for DB2 platforms

    Hi! Is there sombody who can answer these questions?
    I use Oracle Designer v 6.0.3 and I wonder if
    the DB2 ddl scripts that Oracle Designer generates
    can be use for IBM maifraims platform OS/390 ?
    I also wonder if there is any other development tool that
    generates modify or alter scripts?

    Hi,
    my Ora-Trigger-Solution works well on R/3 development system.
    On quality assurance system it dumps with ORA-04098.
    It looks like, that required object privileges have been never granted.
    Do someone know, what priviliges or authorisations have to be maintained and where to maintain this?
    Thanks and regards,
    Wolfgang

  • DB2 UDB 9.1 on z/OS to Oracle 11.2 on AIX

    Dear All,
    Need a road map for migration of DB2 UDB 9.1 on z/OS to Oracle 11.2 on AIX. It isn't a data migration, It is all about the application migration which would include DB2 UDB's - Table(Just the master data alone and will not include application data), Views, Procedures (Cobol 390 - code) , Batch jobs to Oracle 11.2.
    Current i dint find any tool which supports DB2 UDB 9.1 on z/OS to Oracle 11.2. The db2 code is huge(More than 100 Procedures and some 25 Procedure are atleast of 25000 lines of code each). It's a huge application.
    Tools which i have analyzed
    SQL Developer / Oracle Work Bench - Doesn't support DB2 UDB 9.1 on z/OS.
    If i have nothing left, i will be forced to re-write the entire application in plsql. If that is the case will the Cobol 390 (Batch Jobs) would be converted into Proc C* or Shell Scripting in AIX ?
    Let me know if any tool is avaliable to convert DB2 UDB/Cobol-390 into plsql. Please let me know the best way to migrate.
    Regards
    V.Hari

    Unfortunately there are not too much options, even if this was on the same AIX platform, there are several problems when upgrading from 8iR3 to 10gR2, first, 8i is not supported on the 5L AIX version, so you must make several work around for the upgrade process to work.
    As previously directed the only possible way is to perform an export/import. You only have to make sure that roles such as CONNECT have changed and you must provide required user privileges. Do not blindly perform this migration process. I suggest you to read the Oracle 10g new features reference to look for all possible issues you may find.
    Additionally I suggest you to setup a test environment where you can see if your application works as it is currently working on 8i.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14214/toc.htm
    ~ Madrid.

  • DB2 timestamp to oracle timestamp conversion

    Does any one know how to convert Db2 timestamp into oracle timestamp.
    From DB2 we are getting timestamp in this format (2000-03-06-16.02.19.074474) (26 bytes).
    I want to insert this into oracle thru owb into oracle table with column type timestamp.
    Does anyone know the procedure for this type of conversion
    Thanks in advance..

    Hi,
    Try a migration tool at www.ispirer.com/chyfo.html
    It provides you the fastest, the easiest and the most powerful way to migrate
    DB2 database into Oracle.
    It works in conjunction with Oracle SQL Loader. The tool creates text files (moving of LOBs are fully supported), generates
    CREATE TABLE scripts for Oracle and control files for SQL Loader.
    The tool has a lot of other features.
    Best regards, Dmitry.
    null

  • SSIS - DB2 to MS SQL

    I am developing an SSIS package and trying to convert DB2 CHAR data to MS SQL NVarchar and getting this error:
    The Slowly Changing Dimension transform does not allow mapping between column of different types except for DT_STR and DT_WSTR.
    Any help would be appreciated.

     Cast to an object.  You can cast any type to an object and any object to any type.
    jdweng

  • Need some help in debugging this exported script

    Below is DDL generated by visio forward engineering tool . The example below consists of 2 test tables with one foreign key.
    Forward engineering generated DDL script
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table1]') AND type in (N'U'))
    DROP TABLE [dbo].[Table1]
    GO
    CREATE TABLE [dbo].[Table1] (
    [test] CHAR(10) NOT NULL
    , [test2] CHAR(10) NULL
    GO
    ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [Table1_PK] PRIMARY KEY CLUSTERED (
    [test]
    GO
    GO
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table2]') AND type in (N'U'))
    DROP TABLE [dbo].[Table2]
    GO
    CREATE TABLE [dbo].[Table2] (
    [test2] CHAR(10) NOT NULL
    GO
    ALTER TABLE [dbo].[Table2] ADD CONSTRAINT [Table2_PK] PRIMARY KEY CLUSTERED (
    [test2]
    GO
    GO
    ALTER TABLE [dbo].[Table1] WITH CHECK ADD CONSTRAINT [Table2_Table1_FK1] FOREIGN KEY (
    [test2]
    REFERENCES [dbo].[Table2] (
    [test2]
    GO
    GO
    When i converted this DDL script using scratch editor the migration tool gave some errors can anyone help me to resolve below
    DECLARE
    v_temp NUMBER(1, 0) := 0;
    BEGIN
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT *
    FROM objects
    WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table1]')*/
    AND TYPE IN ( N'U' )
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    TRUNCATE TABLE Table1;
    END IF;
    END;
    CREATE TABLE Table1
    test CHAR(10) NOT NULL,
    test2 CHAR(10)
    ALTER TABLE Table1
    ADD
    CONSTRAINT Table1_PK PRIMARY KEY( test );
    --SQLDEV:Following Line Not Recognized
    DECLARE
    v_temp NUMBER(1, 0) := 0;
    BEGIN
    BEGIN
    SELECT 1 INTO v_temp
    FROM DUAL
    WHERE EXISTS ( SELECT *
    FROM objects
    WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table2]')*/
    AND TYPE IN ( N'U' )
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF v_temp = 1 THEN
    TRUNCATE TABLE Table2;
    END IF;
    END;
    CREATE TABLE Table2
    test2 CHAR(10) NOT NULL
    ALTER TABLE Table2
    ADD
    CONSTRAINT Table2_PK PRIMARY KEY( test2 );
    --SQLDEV:Following Line Not Recognized
    ALTER TABLE Table1
    ADD
    CONSTRAINT Table2_Table1_FK1 FOREIGN KEY( test2 ) REFERENCES Table2 (test2)
    --SQLDEV:Following Line Not Recognized
    ;

    Pl do not post duplicates - Need some help in debugging this script

  • Database Adapter: exposing multiple operations using one PartnerLink

    Hi,
    I use the Database Adapter for accessing stored procedures in a package.
    Using the wizard, I am able to specify a PartnerLink for one procedure in my package. However, the same package (my 'business service') contains multiple procedures I want to expose and call, preferably via the same PartnerLink.
    Is this possible?
    If so, what is the best strategy, e.g. use the wizard multiple times and merge the resulting wsdl files?
    Thanks, Sjoerd

    How do you do that?
    I specifically want to Poll a table, with the wizard it doesn't give you any options to edit the query, I suppose you go into the generated files and edit the query that way?
    As it happens I have actually worked around my specific issue using XSLT functions, I was actaully trying to convert DB2 JD Edwards dates using this table lookup) but once I understood how the date format is stored it was simple enough to do in XSLT.
    However I'm still interested to know how this is done as I may have another requirement that requires SQL joining to the same table twice.
    Regards
    Stuart

  • SQL Developer Migrate mySQL to 11g gets ORA-00972 due to 30 char name limit

    I am running MySQL version 5.5.30 server, SQL Developer 3.0.04 Build MAIN-04.34, and Oracle Enterprise Server 11.2.0.1.0, and using Migrate option to move both data dictionary and data from mysql to Oracle
    Most of the steps worked fine using OnLine option: used Capture just fine to generate the repositiory, and Convert generated DDL script just fine in the SQL Developer file folder.
    It failed to create users due to privs, but I created them manually: emulation user and also the MYSQL data schema user, after which I took the generated DDL, connected to my Oracle data schema user, and ran the DDL to basically create all the objects. And found out that over 50 tables / column names from MYSQL are longer then 30 char, and thus the generated DDL fails to create objects..
    Question - I can manually replace the names with shorter 30 char names, but if I do, my data migration step will not work.
    i cannot find references to 'name too long' problem anywhere is SQL Server documentation..
    here is the Oracle error example:
    Error report:
    SQL Error: ORA-00972: identifier is too long
    00972. 00000 - "identifier is too long"
    *Cause:    An identifier with more than 30 characters was specified.
    *Action:   Specify at most 30 characters.
    Creating Primary Key Constraint PRIMARY_1 on table bank_account ...

    Hello,
    have you tried the offline migration option? Then you can probably modify also the ctl file for the SQL*Loader to reflect your changes in the DDL script. I didn't yet try it out, it was just an idea that came to my mind.
    Regards
    Wolfgang

  • Convert ddl db2 in Oracle

    We use a product with the informations stored on a db2 database.
    The customer wants to use Oracle now, so we have to recreate the database.
    The ddl used for db2 are valid for Oracle?
    The sql instructions?
    Ty.
    Edited by: user13377710 on 8-lug-2010 8.11

    you need to create a sequence and a trigger that inserts the value for you or you can directly call the sequence when inserting:
    That's the create table statement
    create table my_test (id number, my_test varchar2(255));
    Now let's define a sequence:
    create sequence test_seq
    start with 1
    increment by 1
    nomaxvalue;
    You can now call the sequence directly during the insert:
    insert into my_test values(test_seq.nextval, 'new_value');
    or if you do not want to want to specify the id column at all, you can use a trigger:
    create trigger test_trigger
    before insert on my_test
    for each row
    begin
    select test_seq.nextval into :new.id from dual;
    end;
    And the insert using the trigger now looks like:
    insert into my_test (my_test) values ('new_value');

  • How can I convert SQL Server 2008 Timestamp to DB2/iSeries Timestamp?

    In DB2/iSeries I have a column that accepts Timestamp value. When I try to insert a timestamp value from the SQL 2008 table and into DB2/iSeries table I recieve the following error message:
    OLE DB provider "IBMDA400" for linked server "XXX" returned message "SQL0180: Syntax of date, time, or timestamp value not valid.
    Cause . . . . . :   The string representation of a date, time, or timestamp value does not conform to the syntax for the specified or implied data type and format. *N is either the character string constant that is not valid or the column or host
    variable that contained the string. If the name is *N, then the value is an expression specified in the statement. If the string was found in a host variable, the host variable number is 1. Recovery  . . . :   Ensure that the date, time, or
    timestamp value conforms to the syntax for the data type it represents. Try the request again.".
    Msg 7343, Level 16, State 2, Line 1
    The OLE DB provider "IBMDA400" for linked server "XXX" could not INSERT INTO table "[IBMDA400]".
    The SQL timestamp column contains the result in the following format:
    2014-04-24 07:39:09.000
    And my insert TSQL command is:
    INSERT INTO OPENQUERY(XXX, 'Select "TimeOfDeal" from ABCD.TICKETS')
    SELECT TimeOfDeal
    FROM dbo.Tickets
    WHERE DealId = 'ABC123'
    I appreciate any help on this issue.

    You are right it is a datetime data type in MS SQL, and a Timestamp in DB2. 
    I cast it to datetime2 and it worked.
    Interesting. I would guess that somewhere under the covers, the date value gets converted to a string, and the different default string formats for datetime and datetime2 is illustrated with this statement:
    SELECT convert(varchar, getdate()), convert(varchar, sysdatetime())
    When I ran it, I got these values:
    Feb 23 2015 12:31PM      2015-02-23 12:31:18.3708899
    Now, why there is a conversion to string in the first place, I'm afraid I don't have any good answer to.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • What is the best iPhone 3G protective case?

    I have my iPhone since July 11 and since then it has been "caseless", I was dead set on the Agent 18 Eco, but after reading several reviews and talking to someone that currently uses that particular case, it seems it actually scratches your phone, wh

  • How to restart JVM after certificate import to truststore?

    Hi I've imported selfsigned certificate but Weblogic says it is not trusted. Java 1.7 and WLS 10.3.0 Certificate encryption is 256bit, key length is 2048bit keytool -import -trustcacerts -file  SELFSIGNEDCERT -alias SELFSIGNEDCERT -keystore $JAVA_HOM

  • Photoshop Elements 11 Will not print?

    Photo shop Elements 11 suddenly will not print to any printer or .pdf generator,  worked fine for months,  suddenly will not print anything?

  • Why do some videos not copy from iphone to pc?

    I don't understand why some videos will not copy from my iphone 4s to my pc (win xp) when I connect iphone usb to pc using "scanner and camera wizard"? Just some of them. It doesn't matter if its 2min or 2 sec long. Just randomly says it can't copy t

  • How to find out correct batch job

    HI All, hope you are doing well. i am trying to findout the correct batch job which is created particular document ( Sale order, invoice etc..) because there are so many jobs which are running by a few system users but am unable to find out which is