Help for migrating DB2 to Oracle11 g, with Sql Developer

Hello, Good Afternoon,
Today I started a series of exercises to migrate DB2 9 to Oracle 11 g, with SQL Developer in order to evaluate this tool for a project we have in door.
But it is setting a number of issues, because the DB2 tables that we are trying to migrate do not have primary key and load the data sets the error ORA-02270.
It is generating an error when trying to convert the following triggers.
CREATE TRIGGER min_salary NO CASCADE
BEFORE INSERT ON staff REFERENCING NEW AS newstaff
FOR EACH ROW MODE DB2SQL BEGIN ATOMIC
SET newstaff.salary =
CASE
WHEN newstaff.job = 'Mgr' AND newstaff.salary < 17000.00 THEN 17000.00
WHEN newstaff.job = 'Sales' AND newstaff.salary < 14000.00 THEN 14000.00
WHEN newstaff.job = 'Clerk' AND newstaff.salary < 10000.00 THEN 10000.00
ELSE newstaff.salary END;
END
CREATE TRIGGER do_not_del_sales NO CASCADE
BEFORE DELETE ON staff REFERENCING OLD AS oldstaff
FOR EACH ROW MODE DB2SQL
WHEN(oldstaff.job = 'Sales') BEGIN ATOMIC SIGNAL SQLSTATE '75000'
('Sales staff cannot be deleted... see the DO_NOT_DEL_SALES trigger.'); END
SEVERE 197 625 oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle Failed to Convert Trigger MIN_SALARY>: class org.antlr.runtime.NoViableAltException -> null: Line 1 Column 0
SEVERE 196 1328 oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle Failed to Convert Trigger DO_NOT_DEL_SALES>: class org.antlr.runtime.NoViableAltException -> null: Line 1 Column 0
I can do for Work Bench (SQL Developer) not validate that DB2 must carry primary keys?
I can do for Work Bench (SQL Developer), I can turn triggers the 2 above?
Greetings

to follow up the root cause of ORA-02270 it would be good to get the DB2 table definition as the table is defined in the Oracle database.
For the other issue with the trigger, please have a look at:
http://www.oracle.com/technetwork/database/migration/db2-084087.html
=> it lists which objects the migration supports as:
Supported Migration Objects
     Tables      
     Views
     Indexes
     Users
     Constraints
=> so no triggers.

Similar Messages

  • Migrate MySQL db to Oracle with SQL Developer / Migration Workbench

    I'm having a problem migrating a MySQL database to an Oracle database. I can make the connection to the MySQL database and query the data, but I can't do the migration.
    When I right-click on the MySQL schema, "Capture Schema" is greyed out. Same problem with clicking on an individual table. Also, the menu item "Migration --> Migrate" is greyed out.
    Can you help?

    Yes, I created a repository. And after your question, I clicked on the repository and was able to get the Migrate Data option for the first time. Thank you!
    Before I had been choosing the source database, which wouldn't allow me to choosse the Migrate Data option no matter what I did.
    Thanks for pointing out the obvious!
    BJ

  • DB2 8.1 to Oracle 11g with SQL Developer 3.0

    Hi,
    I started migrating my DB2 8.1 to Oracle 11g, with SQL Developer 3.0
    Basically, I need to migrate TABLES.
    I followed these steps:
    1) I created a new Oracle database, tablespaces, users, etc.
    2) Then, I created both (DB2 and Oracle) connections into SQL Developer 3.0. All works fine.
    3) I start capturing one table with the "Copy to Oracle" feature. Done with no errors.
    But when I compare the table structure, I see the following problems in Oracle:
    a) All fields are NULLABLE = YES. SQL Developer show this field property correctly in DB2: NULLABLE = NO, but not migrated the same!
    SOLUTION: All I want is that SQL Developer simply migrating the same value who I have in the DB2. But how?
    b) In DB2 I have one field property called COLUM DEFAULT. In Oracle this property is called DATA_DEFAULT. The SQL Developer show this field property correctly for the DB2 tables (for example: 0.0, ' ', etc), but don't migrated the same value! All fields are configured to DATA_DEFAULT = NULL.
    SOLUTION: I think this occurs because NULLABLE is migrated with the value YES. Well, all I need is the same above...
    NOTE: I tested the SWISSQL DATA MIGRATION software, and it works fine. All tables, field properties and data are migrated sucessfull. But this program is trial version!
    Well, I think all of this are BUGS into SQL Developer.
    Please, anyone to help me?
    Regards,
    Ylram

    Welcome to the forum!
    >
    I just did right click in the procedure body and found [Debug, Compile for Debug, Compile, Run].
    >
    You listed a bunch of things but you didn't say what steps you actually performed and what the result was.
    Did you 'Compile'the procedure? until you compile the procedure you can't debug it.
    I just created a new procedure and when I select the body it displays in the 'Code' window on the right. But the 'Debug' icon is not enabled because the procedure was not compiled for debug.
    When I compile it for debug the 'Debug' icon is now enabled.

  • Migration from Access with SQL Developer 1.2.2998 Does not migrate Relation

    Hi,
    I've almost successfully migrated an Access database to Oracle with SQL Developer with Quick Migration Option. Everything went all right, except for the tables relationships... they were not migrated. Have I forgot to do something?
    Thanks in advance.
    PS: Using SQL Developer 1.2.0.29.98, Oracle 10g XE, MS Access 2000 file.

    Hi All,
    This is a bug which crept in just prior to release. It has been found, and a fix has been commited to our source tree. The fix will be available in our next patch release. (1.2.1).
    Regards,
    Dermot.

  • Issue with SQL Developer connect to SQL server

    I'm using "SQL Developer 2.1.1.64.45" to work on a migration project which needs to convert a SQL server database to a Oracle 11g database. But I got an issue when I setup the SQL server connection. The SQL Developer let me connect by selecting a SQL server database name (For example: Northwind), but once connected, it always connected to "master" database instead. The "SQL Developer" is running on Windows 7 Professional (x64) platform. My Oracle database is 11g, and SQL server database is SQL 2005. And my SQL server instance name is "SQL2005". Anyone have ever experienced this problem? Thanks in advance.
    Edited by: user8276338 on Feb 8, 2011 1:05 PM

    Hi Bob,
    Thanks for the feedback, lets stick with SQL Developer 3.
    Correct me if I'm wrong,
    You attempted to migrate from SQL Server to Oracle including target generation and datamove in one go, by filling in each step of the migration wizard to the end.
    During the datamove you got
    ORA-01000:maximum open cursor exceeded
    So it looks like SQL Developer during the migration is not closing cursors fast enough and hits the maximum number of open cursors in your Oracle database.
    I think the default max open cursors is 300 in Oracle.
    There are a few things we can do here.
    You should be able to see the new migration project in your Migration Projects navigator.
    By navigating down the project tree to "Converted Database Objects" we can attempt the data move again by right clicking and choosing "Data Move".
    But first I would restart SQL Developer so as to free up any lingering open cursors.
    That may allow you to complete the data move, as the only cursors being open are being used in the data move and not some cursors which may have been left open from previous steps in the migration.
    Now from my perspective I would like to identify where are we leaving open the cursors, so I'm going to setup some testcases my end to see if I can replicate.
    From your perspective Id presume you just want to move on with the migration.
    So if the above (shutdown and attempt just the data move) doesnt workyou could
    A) Increase the MAX OPEN CURSORs on your Oracle databases so it complete the data move
    or
    B) Use the offline data move technique.
    A) Increase MAX OPEN CURSORs
    This wiki explains how to do that, looks like 1000 is fairly common, but even a much larger number is not a problem
    http://wiki.oracle.com/page/OPEN_CURSORS
    ALTER SYSTEM SET OPEN_CURSORS = 10000;
    OR
    B) Offline Data Move
    If you are moving large amounts of data (say > 1GB), then the standard data move (we call it online), which just uses JDBC to SELECT * FROM and INSERT INTO may not cut the mustard.
    In this case you can try using our offline technique. SQL Developer will generate a set of scripts for you.
    unload_script.bat will use SQL Servers BCP tool to dump out the table data into DAT files.
    oracle_ctl.bat will load the data in the DAT files into Oracle.
    As we know the names of all the tables, columns ,both SQL Server and Oracle, we can generate fairly good scripts.
    The benefit of this technique is large amounts of data can be migrated and you get to use tools designed to dump data and load in data, so you have better error logging and tweaking.
    To attempt this in the Migration Wizard , Data Move page, select offline.
    If you can describe your database a bit (number of tables, number of procedures, amount of data to migrate) I may be able to define my testcase better so I can replicate the issue.
    Thanks
    Dermot
    SQL Developer Team.

  • SQL file does not open in Mac with SQL Developer

    Hi,
    I have my .sql extension files in mac associated with SQL Developer, but when I open the file SQL Developer does not start; nothing happens.
    I checked all the associations and it seems correct.
    Any suggestion?
    Thanks,
    A.Tarquino
    Edited by: aftarquino on Oct 5, 2010 3:48 PM
    Anyone???

    Hi Mike,
    I can provide solution if you can tell me the registry value(HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command). I believe there is an extra %1 which is causing this.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Let me see if I can get my IT guys to temporarily grant me registry access.  As I said above, it's locked down, but maybe if I ask
    reeeeally nicely :-)  I will keep you posted.  Thanks!
    EDIT: The IT gods have smiled on me.  The value for the key above is "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde
    Not sure if that helps, but there you go.  Thanks! 
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Replying to myself in case in-place edits don't trigger a "somebody updated this thread" email.  :-)
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Hey Mike,
    Actually edit didnot trigger the email :)
    Change that to
    "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" %1 /dde
    (add %1 and that should fix this forever)
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq

  • I want to use subversion control tool with SQL Developer

    Dear Gurus,
    I have SQL Developer 2.1 on widows machine.
    I have not used any subversion control tool for maintaining versions. But in my Office, we have TortoiseSVN 1.6.7
    Could any anybody help me to understand subversion concept so as to use TortoiseSVN 1.6.7 with SQL developer.
    And My regular task includes Developing SPs, functions, Packages tables etc.
    How can I use subversion tool in my day to day routine.
    Could anybody provide me links or tutorials so as to use subversion tool with SQL developer.
    Regards
    Sanjeev

    http://st-curriculum.oracle.com/tutorial/SQLDeveloper/index.htm
    Click on "Show Me and Try It"

  • Statement terminator problems when exporting data with SQL Developer 3.2

    I've ran across what appears to be a bug with SQL Developer 3.2.20.09. If someone can let me know if this is indeed a bug, or just something I need to configure differently, please let me know.
    The problem is related to exporting a database as a SQL script, and terminator characters at the end of "create" statements, especially when columns have comments, and problems that occur when using SQLPlus to run the export script to create the tables. With the old SQL Developer 1.5.4, with the "Terminator" and "Pretty Print" options checked, statements like the following are generated:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
    When I then run the script using SQLPlus, everything works fine. However, with SQL Developer 3.2.20.09, with the same options enabled, the same statements are generated like this:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
    Notice all of the extra slashes in there. If a slash is not used as a statement terminator, SQLPlus treats slashes as a command to repeat the last SQL statement, which causes many errors about tables or sequences already existing. So, I tried removing the "Terminator" flag from the export options. This lead to statements that looked a bit more promising:
    -- DDL for Type NUM_ARRAY
    CREATE OR REPLACE TYPE "NUM_ARRAY"
    IS TABLE OF NUMBER(20)
    -- DDL for Sequence MYTABLE_SEQ
    CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE
    -- DDL for Table MYTABLE
    CREATE TABLE "MYTABLE"
    (     "MYTABLE_ID" NUMBER,
         "COL2" NUMBER,
         "COL3" NUMBER
    -- DDL for Table ANOTHERTABLE
    CREATE TABLE "ANOTHERTABLE"
    (     "ANOTHERTABLE_ID" NUMBER,
         "COL2" VARCHAR2(1024),
         "COL3" VARCHAR2(1024)
    COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.'
    The big problem, though, is in the statement for the table with a comment. Notice that there are two statements, but there is not a semicolon after either of them. This unfortunately causes the "COMMENT" statement to be appended to the "CREATE TABLE" statement before being executed, which causes the table to not be created (which causes even more errors later on when the script attempts to populate the table with data).
    So, it would appear that this is a bug, but I'm not sure. Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
    Thanks,
    -Bill

    >
    So, it would appear that this is a bug, but I'm not sure.
    >
    That would be a bug. Thanks for reporting it and providing the detailed example.
    >
    Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
    >
    No.
    Leave the thread open. One of the developers for sql developer should be monitoring the forum and can provide more information.

  • Problems with SQL Developer 2.1

    I have upgraded to SQL Developer 2.1 from 1.5.5.
    Iam presenting my overall experience with SQL Developer 2.1 compare to 1.5.5 version.
    If the session expires, reconnecting is really pain in all SQL Developer versions. It opens a new blank window every time we reconnect, we have to copy all the things into new window every time.
    when i tried to execute an insert as select statement it is showing nothing, but it's doing something in the background.
    My templates are not working for (ctrl+Shift+T) after i upgraded to 2.1 from 1.5.5.
    Things I tried and liked in 2.1 are*
    1. 2.1 gives the exact time taken to return the no.of rows (Ex: If it returns first 50 rows, it will display time taken for that particular 50 rows only).
    Things I did not like in 2.1*
    1. When we try to expand a node, it shows "Loading and folder icon" (I didn't like the folder icon showing up every time)
    2. I did not like the new icon for SQL Developer 2.1 itself. (It has become hard to identify the 2.1 on the task bar with this icon)
    3. I did not like the close(i.e., x) on the worksheet tab.
    4. Look and feel wise 1.5.5 is better than 2.1
    Thanks!
    RG

    Regrettably we can't please all the people all the time.
    The little cross was a request specifically from the user community. We had complaints that users inadvertently closed windows and wanted a permanent symbol to show the closing tab. This took much effort and time to finally introduce into the product as it had to be approved through usability teams and introduced into the underlying IDE.
    The release notes explain that there is no longer a key sequence for the Code Templates, start typing your code and it should appear in the code insight.
    The icon updates on the taskbar was also an update based on user feedback.
    While there won't be many changes between the release candidate and production, I do remind you that you are working with beta software and not production software.
    Thank you for taking the tiem to post your feedback. I hope you'll find lots to really like in the latest release. Take a look through the 2.1 New Features list.
    Sue

  • Jdbc-OCI:112020 Error with SQL Developer 4.0.0.12

    Hi,
    I receive an error, Incompatible version of libocijdbc[Jdbc:112030, Jdbc-OCI:112020, when attempting to log into an existing connection with SQL Developer 4.0.0.12.  I do have the JDK 7u45 for 32 bit Windows 7.  I know this was an issue in the past and attempted to look at earlier solutions with no luck.  Any idea?

    The issue is that if you are using the OCI (thick) JDBC  driver the version of the JDBC library (in SQLDeveloper) must match the version in your ORACLE_HOME. 
    It seems SQLDeveloper 4 ships with 11.2.0.3 version of JDBC and you have 11.2.0.2 client installed.
    Possible options:
    1     Don't use the OCI driver.  You can untick the box in Tools |Preferences|Database |Advanced, but some connection types use it anyway.
    2     Upgrade your Oracle client.

  • Double click to open .sql files with sql developer on mac osx

    hi,
    I am trying to double click a .sql file and open it with SQL Developer on Mac OSX lion. I have associated .sql files to SQL Developer. On clicking the file it opens the SQL developer application but does not open the actual .sql file. Any ideas?
    Thanks

    Hello,
    Did you find any solution to your problem ? My SQL Developer worked fine and could open additional SQL files. Now it only opens the first one when starting SQL Developer. Additionnal files cannot be opened. Even running sqldeveloper.exe from command line with a SQL file as parameter doesn't help.
    I'm on Windows 7, 64 bit, but the environment may not necessarily be the cause.
    Regards
    -- Alwin

  • Screen refresh issue with SQL Developer 1.5.5 on Vista 64 bit

    I am using the latest version of SQL Developer.
    I have screen refresh issues in sql developer. On scrolling up and down the display gets jumbled, some time screen do not display at all. Its making working with SQL Developer very difficult. I don't have such an issue with any of my other editors.
    Is this something specific to Vista? Is there any know solution to this issue.
    Thanks
    Edited by: user5899685 on Sep 1, 2009 11:14 AM

    Specific? Not really, but judging from the posts here Vista is more prone. It usually indicates incompatibility between Java and video drivers.
    If updating your JDK or video driver doesn't work or isn't an option, just disabling DirectDraw in \sqldeveloper\bin\sqldeveloper.conf usually works too:
    AddVMOption -Dsun.java2d.noddraw=trueHope that helps,
    K.

  • View jobs with SQL Developer and export to file with delimiter

    Hi,
    is there a way to view, create and alter my database jobs with SQL developer?
    And is it possible to export tables, views or simple queries to file delimited different from the CSV standard?
    Diego.

    Hi and Welcome to the Forum!!
    To select data from a table or a view you must use the SELECT sql command. Example to get the data from your view you can
    select ZMATNUM,ZMATCUR,ZMATATTR from ZMATERIALAs you have said you are using SQL Developer just execute the above query in your sql developer and it will show the data. Right click the grid and export the data to excel file.

  • What version of Data Modeler comes with SQL Developer EA 3.1?

    Hi:
    I've looked but can't find what version of Data Modeler is shipped with SQL Developer 3.1 EA1. Is it Data Modeler EA 3.1 or the production Data Modeler 3.0 version?
    Thanks,
    Doc

    Hi:
    I ran an import and here's what the log showed...so it looks like SQL Developer EA 3.1 uses the production version of SQL Data Modeler...3.0.
    Oracle SQL Developer Data Modeler 3.0.0.665.2
    Oracle SQL Developer Data Modeler Import Log
    Date and Time: 2011-11-14 14:19:42 PST
    Design Name:
    RDBMS: Oracle Database 10g

  • To display chinese characters with SQL Developer

    I have created one table on the Oracle Express Database. In this table ther is one field Nchar tipe.
    The NLS_CHARACTERSET of the d.b. is WE8MSWIN1252, the NLS_NCHAR_CHARACTERSET is AL16UTF16.
    I have done an insert on the table and in this field i have inserted this word: 了解更多
    When i do a select comand with sql developer, on the results i see this only this •••• .
    But if i copy this and cut on the Sql Developer editor, i see the corret word.
    How could i configurate ?
    Regards
    Mario

    Hi
    The following works but there may be better solutions:
    http://totierne.blogspot.com/2008/05/issuesquare-boxes-as-text-characters.html
    Issue:Square boxes as text characters Solution:Add fonts
    Chinese characters in Linux see Debian Chinese How To [1] basically:
    1. create a jre/lib/fonts/fallback directory if necessary and
    2. copy or link the fonts files into this directory. (On my Linux system: /usr/share/fonts/truetype/arphic/gbsn00lp.ttf )
    -Turloch

Maybe you are looking for