SQL Dev Migration ignores views in mysql

The 'capture' process identifes views. The 'converted model' includes references to the views, but the 'generated' script does not contain any reference to the views. Thus views are never recreated. User permissions in target db are sufficient for creating views.
SQL developer lists "Failed to convert view vw_xyx" in "migration log" but provides no details as to why!

Hi < Please Supply Name>,
Looks like you have attempted the migration using two features.
*Migrate to Oracle
*Copy to Oracle
Migration To Oracle
With the Migrate to Oracle you said "i hav granted all mandatory permissions to the user".
This suggests that you expected the migrated objects to be created in an existing Oracle Schema.
This is not the default way SQL Developer migrates databases.
Instead SQL Developer will create a new schema for you (normally <sqlserverusername>_<sqlserver_databasename>) and create all the objects underneath this new schema.
When you choose the Connection in step 7 of the migration wizard. This connection is only used to connect to the database. The migrated objects are not created underneath this connections schema.
Instead this connection is used to create a new schema ( <sqlserverusername>_<sqlserver_databasename>) and the objects are placed under it.
You should choose a connection with enough privileges to create new Schemas. Like a connection to SYSTEM.
It is possible to migrate to an existing schema but explaining it here may confuse the issue.
So first I would migrate using a connection to SYSTEM and see if your new (<sqlserverusername>_<sqlserver_databasename>) is created in your Oracle database.
Copy To Oracle
I'm not sure of the issue you encountered. Copy to Oracle is really only for small amounts of data and tables.
If you could supply the DDL of a table which is failing I could replicate the issue.
Regards,
Dermot
SQL Developer Team.

Similar Messages

  • How to use SQL Dev with MySQL DBs ? Connection Setup

    As far as I know SQL Dev can be used with MySQL databases as well.
    How do I have to setup the connection for MySQL?
    In detail what do I have to enter for
    -role
    -connection type
    SID/ServiceName
    Or is there a separate version for Oracle and MySQLß
    Peter
    Edited by: user5328442 on Jan 5, 2011 9:23 AM

    Hi,
    After downloading the MySQL plugin did you add the details in the third party database list ?
    Do the following -
    - Tools
    - Preferences
    - expand the Database option if necessary
    - Third Party JDBC Drivers
    - add the location and file name of the plugin.
    On my setup it is -
    D:\mysql_jdbc\mysql-connector-java-5.0.8\mysql-connector-java-5.0.8-bin.jar
    The driver may be different if you have a later version.
    Regards,
    Mike
    Edited by: mkirtley on Jan 7, 2011 9:46 AM

  • SQL Dev converts MS SQL to Oracle - issue with numeric prefix column name

    Hi,
    We're working on migrating MS SQL data into Oracle 10g. An issue we encountered is that some of MS SQL's tables have column names with numeric prefix like 1Q07, 2Q07, ..., 4Q08, and so on. The converted model as well as script can be created. But one thing I notice is that SQL Dev appends a prefix "A" for column names with numeric prefix. This makes sense because Oracle does not allow a column with number. But somehow this does not work with only 4Q
    1Q04 => A1Q01
    2Q07 => A2Q07
    3Q08 => A3Q08
    4Q08 => 4Q08 ???
    Why? Any place in the tool where I can override this?
    Obviously I can manually modify column name 4Q08 to A4Q08 in the script. But by doing this when moving data, it would fail because tool has no knowledge of updated column name.
    Thanks in advance.

    Hi ittichai,
    In <repository>.MIGRATION_TRANSFORMER body
    FUNCTION first_char_check(p_work NVARCHAR2) RETURN NVARCHAR2
    v_allowed := C_DISALLOWED_CHARS || '012356789_$';
    should be
    v_allowed := C_DISALLOWED_CHARS || '0123456789_$';
    If you make this change and convert the 4Q08 will be
    A4Q08 is expected, without any manual rename.
    -Turloch
    Message was edited by:
    Turloch O'Tierney

  • Need help with SQL Query with Inline View + Group by

    Hello Gurus,
    I would really appreciate your time and effort regarding this query. I have the following data set.
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*20.00*-------------19
    1234567----------11223--------------7/5/2008-----------Adjustment for bad quality---------44345563------------------A-----------------10.00------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765--------------------I---------------------30.00-------------19
    Please Ignore '----', added it for clarity
    I am trying to write a query to aggregate paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number. When there are no multiple records I want to display the respective Description.
    The query should return the following data set
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*10.00*------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765-------------------I---------------------30.00--------------19
    The following is my query. I am kind of lost.
    select B.Description, A.sequence_id,A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
    from (
    select sequence_id,check_date, check_number, invoice_number, sum(paid_amount) amount, vendor_number
    from INVOICE
    group by sequence_id,check_date, check_number, invoice_number, vendor_number
    ) A, INVOICE B
    where A.sequence_id = B.sequence_id
    Thanks,
    Nick

    It looks like it is a duplicate thread - correct me if i'm wrong in this case ->
    Need help with SQL Query with Inline View + Group by
    Regards.
    Satyaki De.

  • Using Linked SQL server in a View

    Hello All:
        I have a new view that reads data from the base source server/table.   Also, it links in another server (using the sp_addlinkedserver command).
    When I run the script not in a view, it works.   When I create a view with this script, it does not find the linked server.   Is there some issue with linked servers from within a view or perhaps I am creating the view
    incorrectly in combination with the linking of the server?   I have begining of the view creation below.   Ideas?    Thanks
    If OBJECT_ID('dbo.V_CombinedLaborHours') IS NOT NULL
        DROP VIEW dbo.V_CombinedLaborHours;
    GO
    use SQL_Server_1
    EXEC sp_addlinkedserver 'SQL_Server_2', N'SQL Server'
    GO
    Create View dbo.V_CombinedLaborHours
    AS
    select

    Sorry, that difference in the name was a typo.   I manually changed the name for display purposes only.   My company forbids actual server and database names to be exposed to the outside.  
    When I run the script from outside of the view, it works (linking the second server etc) and I can see the data coming from the view.   It is just when I create the view (as shown in the first entry in this thread) then it is as if the view is
    not running the sp_addlinkedserver command.
    Perhaps I cannot run the link to the second server out side of the "AS" command?   I tried having it inside of the "AS" but then it throws error.  When I look at the definition of the View it is not showing the link to
    the second server as if it got ignored during the create of the view.

  • ADDM Report is not produced by SQL DEV 4.0 if logged in user does not have SYSDBA privilege

    Hello -
    In SQLDEV 4.0 (Early Adapter), I logged in as user with no SYSDBA privilege granted. But ADVISOR granted and  execute on DBMS_ADDM granted and "select any dictionary" granted, etc.
    Then i go to the menu View --> DBA --> Performance --> Automatic Database Diagnostic Monitor
    Select ADDM report from the available choices.
    Out of 3 menu options: Summary, Findings and ADDM Report, I can see the first two, but I am getting a grey screen for ADDM Report.
    ^^^^^^^^^^^^^^^^^^^^^
    If i do exactly the same but login as SYSDBA, then ADDM Report can be produced and can be seen. So the issue is in the missing grants and privileges.
    ^^^^^^^^^^^^^^^^^^^^^^
    The goal that we are pursuing in our shop is to empower developers to work with ADDM reports by having them login as non-SYSDBA user.
    ^^^^^^^^^^^^^^^^^^^^^^^^
    Please advise what privilege should be granted to get this working for non-SYSDBA login
    The same user can successfully execute $ORACLE_HOME/rdbms/admin/addmrpt.sql and produce file with complete ADDM report. But not able to get the ADDM from SQL DEV 4.0
    Thank you,
    vr

    Thank you, Phil.
    This worked for me in my quick test case.
    Great help, as DBA group wants to allow NON-privileged users (like Developers and QA) to execute ADDM on demand.
    Here is my observation for RAC database with two instances.
    I have followed your instructions:
    "Performance / Automatic Database Diagnostic Monitor -> Run ADDM"
    Then
    - Uncheck box "By Creating New Snapshot" (this box was checked by default)
    - Provide new "Task Name" (let's say "vr1")
    - Select "Start Snapshot" (this is where my first confusion is: each screen shot # is shown twice, may be because i have two instances of RAC)
    - Select "End Snapshot" (the same way: each SNAP_ID is shown twice)
    - and finally APPLY button is pressed
    This creates 3 reports:
    vr1
    vr1$1 (for instance_id=1)
    vr1$2 (for instance_id=2_
    So, my question is: this expected and normal behavior of the tool?
    What if my RAC database has 8 instances? Then I would generate 9 separate ADDM reports?
    Is this correct observation?
    Thank you,
    vr

  • SQL Dev does not recognize NTILE

    I admire how SQL Dev autocompletes GROUP BY statements. However, in a statement like
    select eaddress, count(*) purchases, NTILE(10) OVER (ORDER BY count(*) asc) AS decile ... etc.
    it keeps adding the NTILE clause to the GROUP BY statement. NTILE should be treated like an Aggregate function ala count(*), sum(x), etc.
    Can you guys make sure all the Oracle "SQL for Analysis" functions (ala http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm) are properly treated in the GROUP BY autocomplete (ie, ignored just like any other aggregate function)?
    I am using Oracle SQL Developer 2.1.0.63 Build MAIN-63.73
    IDE Version: 11.1.1.2.36.55.30
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.63.73
    Thanks, Michael

    And that's the reason I wonder if there's a full bug list publicly available.
    2.1 Autogenerate GROUP BY and anlaytic functions
    ....posted the same thing three months later and never got a response. At the time the forum search didn't return that for me when looked for "Group By"

  • SAP DEV migration process error

    Hi all,
    SAP DEV migration process error.Error Details:
    Source system
      SAP ECC6.0 SR2
      DB: DB2.9.1.4
      OS: AIX 5.3
    Target system
      SAP ECC6.0 SR2
      DB: DB2.9.1.4
      OS: SUSE 10 64 Bit
    ERROR      2008-11-13 07:41:06
               CJSlibModule::writeError_impl()
    CJS-30023  Process call '/usr/sap/DEV/SYS/exe/run/dipgntab -rwr40 -srctt DDNTT -srctf DDNTF -dsttt DDNTT -dsttf DDNTF -ttonly TT' exits with error code 126. For details see log file(s) dipgntab.log.
    TRACE      [iaxxejsbas.hpp:460]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2008-11-13 07:41:06 [iaxxgenimp.cpp:731]
               showDialog()
    FCO-00011  The step adjustNametab with step key |NW_Doublestack_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_Postload|ind|ind|ind|ind|10|0|NW_Postload_DB6|ind|ind|ind|ind|5|0|adjustNametab was executed with status ERROR .
    TRACE      [iaxxgenimp.cpp:719]
               showDialog()
    <html><head></head><body><p>An error occurred while processing service <b>SAP ERP 2005 Support Release 2 > Additional Software Life-Cycle Tasks > System Copy > IBM DB2 for Linux, UNIX, and Windows > Target System > Central System > Based on AS ABAP and AS Java > Central System Installation</b>. You may now</p><ul> <li>press <I>Retry</I> to repeat the current step.</li> <li>press the <I>View Log</I> button to get more information about the error.</li> <li>stop the task and continue with it later.</li></ul><p>Log files are written to <b>/tmp/sapinst_instdir/ERP/LM/COPY/DB6/SYSTEM/CENTRAL/AS/</b>.</p></body></html>
    TRACE      [iaxxgenimp.cpp:1155]
               showDialog()
    waiting for an answer from gui
    dipgntab.log
    /usr/sap/DEV/SYS/exe/run/dipgntab: /usr/sap/DEV/SYS/exe/run/dipgntab: cannot execute binary file

    Hi,
    1. please check if /usr/sap/DEV/SYS/exe/run/dipgntab exists or not ?
    2. Does it have executable permissions?
    3. Does your user have authorization to execute it?
    4. if you executed dipgntab manually, does it work ?
    Regards,
    Vincent

  • MS SQL Server Migration Errors

    Attempting to migrate from a Microsoft SQL Server Database to a Oracle database, perform all requirements in the tutorial
    <?xml version="1.0" encoding="windows-1252" standalone="no"?>
    <log>
    <record>
      <date>2015-04-29T13:48:50</date>
      <logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
      <level>SEVERE</level>
      <class>oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil</class>
      <message>Capture
    Enterprise Capture
    Capture failed.  Refer to MIGRLOG table in the repository for details</message>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doOnlineEnterpriseCapture(FullMigrateTask.java:758)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doCapture(FullMigrateTask.java:601)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doMaskBasedActions(FullMigrateTask.java:400)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:314)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:147)</param>
      <param>oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)</param>
      <param>java.util.concurrent.FutureTask.run(FutureTask.java:262)</param>
      <param>oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:554)</param>
      <param>java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)</param>
      <param>java.util.concurrent.FutureTask.run(FutureTask.java:262)</param>
      <param>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)</param>
      <param>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)</param>
      <param>java.lang.Thread.run(Thread.java:745)</param>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@8b1009a</param>
      <exception>
        <message>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask$FullMigrateTaskException: Capture
    Enterprise Capture
    Capture failed.  Refer to MIGRLOG table in the repository for details</message>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>758</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>601</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>400</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>314</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>147</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTask</class>
          <line>193</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>262</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask</class>
          <line>554</line>
        </frame>
        <frame>
          <class>java.util.concurrent.Executors$RunnableAdapter</class>
          <line>471</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>262</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor</class>
          <line>1145</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor$Worker</class>
          <line>615</line>
        </frame>
        <frame>
          <class>java.lang.Thread</class>
          <line>745</line>
        </frame>
      </exception>
    </record>
    <record>
      <date>2015-04-29T13:48:50</date>
      <logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
      <level>WARNING</level>
      <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
      <message>Error:ORA-06550: line 1, column 14:
    PLS-00201: identifier 'SS2K5ALLPLATFORM.STAGECAPTURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    : FAILED : Database Migration : FAILED</message>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@7b6bccbd</param>
    </record>
    Here is the log it printed out, unsure of what to do, research shows that maybe the user doesn't have enough privileges, or possibly we ran out of tablespace
    we are running off of SQL Developer 4.0.3 and using jTDS Drivers 1.3.1 from sourceforge

    See Issue with migration DB from SQL Server 2012 to Oracle 11.2 using SQL Developer Migration workbench
    The tutorial isn't as complete as the docs. Read the help/docs on creating the migration repository, and make sure all the proper privs have been granted.

  • Cancelling Query Results in Continually Busy Connection -- SQL Dev 2.1 EA2

    Hello All --
    I am running SQL Developer 2.1 EA2 on the Windows 7 Release Candidate (64-bit). I have had issues when canceling long-running queries. Usually what happens is I run something, and realize after a couple of minutes that it's going to take quite a while to run. So, I click the cancel button. Things seem OK, I can resume editing the query. However, when I try to re-run the query (after modifying it) or even just to run an explain plan, I find that I can't re-connect to the DB. I go to the connection pane to try to disconnect and reconnect to the server in question, but when I try to disconnect I keep getting error messages about the connection still being busy, would I like to Retry or Abort? I can keep clicking either of the options ad infinitum with no results.
    I have to kill SQL Developer from Task Manager and re-start. I am connecting for the most part to Oracle 10.2.0.4 databases (10g2), some RAC, some stand-alone.
    EA2's behavior is better than SQL DEV 1.5.x, which would simply often lock, but this is still frustrating.
    Thanks!

    This definitely occurs in 1.5.5 - in my particular case, and this is really strange, if one uses Task Manager to shut down SQLDeveloper because it is just taking forever to get a Data view (via the + expand sign on the side of a given admittedly big table, then clicking on the Data tab), SQLDeveloper freezes. Even if I start a new instance of SQLDeveloper, and ask for a Data view again, it freezes - I've waited as much as 1/2 hour, where as in prior days I'd get a response within say 1 min.
    I've even uninstalled and re-installed. Same deal. This is what's the strangest by far. How can it be that SQLDeveloper remembers that a long running query was once canceled even after an uninstall / reinstall ? I could not find anything remotely related to this in the Registry after the uninstall either.
    [By the way, if on the other hand, I say SELECT * FROM {table_name}, I get an instant response !]

  • Error in Migration Repository using Sql*Developer Migration Workbench

    To migrate a MS access mdb database to Oracle using Sql*Developer Migration Workbench, I try to create first the the Migration Repository in SQL*Developer.
    The repository is created, but under PACKAGES I could see that package MD_META has been compiled with errors.
    PACKAGE BODY AO_PERSONAL.MD_META@DMCAPX (AO_PERSONAL):
    Error(27,2): PL/SQL: SQL Statement ignored
    Error(30,23): PL/SQL: ORA-00904: : ungültiger Bezeichner
    Well, when I ignore this and continue with the next step of the migration process "Capture Microsoft Access Exported XML file" to create the Captured Model, I get the following error message:
    ORA-04063: package body "AO_PERSONAL.MD_META" enthält Fehler ORA-06508: PL/SQL: aufgerufene Programmeinheit : "AO_PERSONAL.MD_META" konnte nicht gefunden werden ORA-06512: in "AO_PERSONAL.MD_PROJECTS_TRG", Zeile 3 ORA-04088: Fehler bei der Ausführung von Trigger 'AO_PERSONAL.MD_PROJECTS_TRG'
    Target database RDBMS is Oracle Database 10g Enterprise Edition Release 10.2.0.3.0. So the proposal of note 427916.1 to create the Repository in a 10.2 RDBMS does not solve the problem.
    I even tried to use the Quick Migrate feature in SQL*Developer, but got the same error message.

    "inserted value too large for column"
    Is there a LOGON trigger on the database or user ?
    I'd be surprised at SQL Developer trying to insert data into anything on connect.
    I'd suspect code being executed by the database, maybe using a MODULE or PROGRAM from v$session or USERENV / SYS_CONTEXT.

  • SQL Dev anomolies

    SQL Dev 3.2.20.09
    Windows 7 Pro.
    I just installad SQL Dev on a power user's workstation and discovered a couple of things
    1) - The tables and views folders in the navigation pane return nothing. If the same user connects with sqlplus and selects from ALL_TABLES and ALL_VIEWS, he gets the expected result.
    2) - Well, now I am losing my mind ... I'll leave point #2 for later.

    Jeff Smith SQLDev PM wrote:
    The tables and views are filtered by your logon user.
    ALL_TABLES and ALL_VIEWS show every view and table in the database.
    Well, not every table/view in the database, just those the connected user has been granted access to. (ALL_TABLES vs. DBA_TABLES).
    You have to navigate down the connection tree to the 'Other Users' node, expand, and pull up your objects by owner/schema/user.
    Ah. You may dope slap me on this one. Of course ... the results under the navigation tree are going to default to USER_TABLES, not ALL_TABLES.
    For point #2 - this is normal :)And getting more normal with frightening regularity .. for me, anyway!
    Edited by: EdStevens on Nov 19, 2012 1:08 PM

  • Error converting SQL Server DDL and views to Oracle

    I am trying to convert SQL Serve 2008 on windows to Oracle 11g using SQL Developer 3.2.20.09. I am using the jtds-1.2.7 drivers to connect to SQL Server.
    I have made several attempts to run the conversion and am getting the tables, indexes, and triggers converted with no issue. However, my Procedures and views are not coming across. All of them are giving similar errors as:
    "Failed To Convert Stored Procedure get_compvision > esp3.dbo.get_compvision:unexpected end of subtree: Line 0 Column 0"
    When I log into the source SQL Server environment using SQL Developer, I get an empty SQL Editor window with "null" when I try to {right-click -> "Open"} on the Procedure.
    Logging into SQL Server Administrator as the same user I can see the source code, so the issue appears to be related to SQL Developer and not my user privleges. I am a dbo alias in SQL Server.
    In addition, if I click on a view, I can see the data and metadata, but not the SQL that defines the view. I see tabs for column, data, triggers, and details.
    In addition, if I go to the "capture" for my Migration project and drill down to procedures, I can see them listed, but each and every procedure gives me a "/* DDL not accesible */" error. I get teh same results for views, triggers and indexes.
    Can someone help me? I have been googling for days!
    Edited by: user4714217 on Jan 24, 2013 12:54 PM

    SELECT v.vnd_c, CASE v.use_parent_addr_flg WHEN 0 THEN a.str_1 ELSE pa.str_1 END AS str_1,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.str_2 ELSE pa.str_2 END AS str_2,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.str_3 ELSE pa.str_3 END AS str_3,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.city ELSE pa.city END AS city,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.state ELSE pa.state END AS state,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.zipcode ELSE pa.zipcode END AS zipcode,
    CAST((CASE v.use_parent_addr_flg WHEN 0 THEN (CASE a.foreign_flg WHEN 1 THEN 'Y' ELSE 'N' END)
    ELSE (CASE pa.foreign_flg WHEN 1 THEN 'Y' ELSE 'N' END) END) AS char(1)) AS foreign_flg,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.country ELSE pa.country END AS country,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.cre_d ELSE pa.cre_d END AS cre_d,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.mod_d ELSE pa.mod_d END AS mod_d,
    CASE v.use_parent_addr_flg WHEN 0 THEN a.mod_by ELSE pa.mod_by END AS mod_by
    FROM dbo.om_vendor AS v LEFT OUTER JOIN
    dbo.om_address AS a ON a.vnd_id = v.vnd_id AND a.addr_c = 1 INNER JOIN
    dbo.om_owner AS o ON v.owr_id = o.owr_id INNER JOIN
    dbo.om_address AS pa INNER JOIN
    dbo.primary_vendors AS pv ON pa.vnd_id = pv.vnd_id ON o.part_id = pv.part_id
    WHERE (pa.addr_c = 1)
    WHICH TRANSLATES TO
    SELECT v.vnd_c ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.str_1
    ELSE pa.str_1
    END str_1 ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.str_2
    ELSE pa.str_2
    END str_2 ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.str_3
    ELSE pa.str_3
    END str_3 ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.city
    ELSE pa.city
    END city ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.STATE
    ELSE pa.STATE
    END STATE ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.zipcode
    ELSE pa.zipcode
    END zipcode ,
    (CASE v.use_parent_addr_flg
    WHEN 0 THEN (CASE a.foreign_flg
    WHEN 1 THEN 'Y'
    ELSE 'N'
    END)
    ELSE (CASE pa.foreign_flg
    WHEN 1 THEN 'Y'
    ELSE 'N'
    END)
    END) foreign_flg ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.country
    ELSE pa.country
    END country ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.cre_d
    ELSE pa.cre_d
    END cre_d ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.mod_d
    ELSE pa.mod_d
    END mod_d ,
    CASE v.use_parent_addr_flg
    WHEN 0 THEN a.mod_by
    ELSE pa.mod_by
    END mod_by
    FROM om_vendor v
    LEFT JOIN om_address a
    ON a.vnd_id = v.vnd_id
    AND a.addr_c = 1
    JOIN om_owner o
    ON v.owr_id = o.owr_id
    JOIN om_address pa
    JOIN primary_vendors pv
    ON pa.vnd_id = pv.vnd_id
    ON o.part_id = pv.part_id
    WHERE ( pa.addr_c = 1 );
    Edited by: user4714217 on Jan 24, 2013 1:43 PM

  • DB2 to Oracle conversion using SQL Developer Migration Wizard - different schemas

    I am performing a conversion between DB2  to Oracle 11 XE, using the SQL Developer Migration Wizard. Specifically I am trying to migrate the DB2User schema over to Oracle.
    Using the migration wizard, when I pick the Oracle target connection to be the same schema ( DB2User schema ) the migration is successful and all data is converted.
    However if I pick a different Oracle target connection ( say OracleUser ) , I run into issues.
    Firstly , the table schema is not created. When I check the project output directory, the .out file has the following errors:
       CREATE USER DB2User IDENTIFIED BY DB2User DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
            SQL Error: ORA-01031: insufficient privileges
            01031. 00000 -  "insufficient privileges"
        connect DB2User/DB2User
        Error report:
        Connection Failed
        Commit
        Connection created by CONNECT script command disconnected
    I worked around this by manually executing the .sql in the project output directory using the OracleUser id  in the new DB.
    Then I continue with the migration wizard and perform the Move Data step.
    Now - the message appears as succuessful, however, when I review the Migrationlog.xml file, i see errors as follows:
    <level>SEVERE</level>
      <class>oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil</class>
      <message>Failed to disable constraints: Data Move</message>
      <key>DataMove.DISABLE_CONSTRAINTS_FAILED</key>
      <catalog>&lt;null&gt;</catalog>
      <param>Data Move</param>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@753f827a</param>
      <exception>
        <message>java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist</message>
      <level>WARNING</level>
      <class>oracle.dbtools.migration.datamove.online.TriggerHandler</class>
      <message>ORA-01031: insufficient privileges
    </message>
    I think what is happening is that the wizard is attempting to perform the 'move data' process using the DB2User id.
    How do I tell the wizard that the target schema is different than my source schema.
    My requirement is that I need to be able to migrate the DB2User schema to different schemas in the same Oracle database
    ( since we will have multiple test environments under the same database ) .
    Thanks in advance .
    K.

    Perhaps the following from the SQL Developer documentation is helpful for you:
    Command-Line Interface for Migration
    As an alternative to using the SQL Developer graphical interface for migration operations, you can use the migration batch file (Windows) or shell script (Linux) on the operating system command line. These files are located in the sqldeveloper\sqldeveloper\bin folder or sqldeveloper/sqldeveloper/bin directory under the location where you installed SQL Developer.
    migration.bat or migration.sh accepts these commands: capture, convert, datamove, delcaptured, delconn, delconverted, driver, generate, guide, help, idmap, info, init, lscaptured, lsconn, lsconverted, mkconn, qm, runsql, and scan. For information about the syntax and options, start by running migration without any parameters at the system command prompt. For example:
    C:\Program Files\sqldeveloper\sqldeveloper\bin>migration
    You can use the -help option for information about one or more actions. For the most detailed information, including some examples, use the -help=guide option. For example:
    C:\Program Files\sqldeveloper\sqldeveloper\bin>migration -help=guide
    Regards
    Wolfgang

  • SQL Dev setup

    Hi all
    I am new and learning SQL Developer. I am trying to connect to a DB. I belive i have to install one. How does that work or is there some instructions on how to do this?
    Add a DB to SQL Dev to pratice scripts on?
    Thanks Y'all.
    R

    Hi 300,
    The link you reference just provides some documentation and SQL scripts for installing a demonstration Student/Course/Grade schema into an existing Oracle database. You also must do one of the following:
    1. Install a database locally.
    2. Have someone give you connection details for a remote database.
    3. Or, similar to (1), use JeffS's suggestion for installing the VirtualBox and Linux VM image with Oracle 11.2 and SQL Developer (among other things) already installed.
    JeffS provides a link for (3) and jflack for (1).
    In terms of being able to create a connection in SQL Developer, look for Help|Table of Contents|SQL Developer Concepts and Usage|Database Connections and read through it. Start by creating a connection for the SYSTEM user. That will let you create a new schema in which to install the Student/Course/Grade demo. For a "Basic" connection type, you will use the following connection details:
    1. For an Oracle XE default install, host/port/sid will be localhost/1521/xe. User/password is system/<yourInstallationDefaultChoice>
    2. For the VirtualBox Linux VM image, host/port/sid will be localhost/1521/orcl. User/password is system/oracle
    In SQL Developer's Connections View, right-click on the Connections node and choose New Connection... and fill in connection details for the System user. Next, open the connection for System, expand its node, scroll down to the Other Users node. There you can right-click on the node and select Create User... to create the student/learn user for your demo.
    I haven't read through the demo scripts and documentation, but I suppose you should at least check off the CONNECT and RESOURCE roles for this student user.
    Finally, create a connection for this student user, open that connection, then try running the script(s) from the SQL Worksheet. If the scripts contain some syntax SQL Developer does not support, you may have to run them using SQL*Plus, but I doubt it will be necessary in this simple demo.
    Have fun,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Feb 29, 2012 5:02 PM
    Added point about creating a connection for the student user schema.

Maybe you are looking for