SQL Dev  3.0.04 Database Diff on Tables ignores Enabled/Disabled flag. Bug?

Hello everyone,
it seems like SQLDeveloper Ver. 3.0.0.4 Tools -> Database Diff ignores ENABLED/DISABLED flag when comparing tables. Namely, two tables (in two schemas) were reported identical although a foreign key constraint was enabled in one schema and disabled in the other schema.
Am I missing something or is this indeed a bug?
Many thanks,
Bob

Hello everyone,
it seems like SQLDeveloper Ver. 3.0.0.4 Tools -> Database Diff ignores ENABLED/DISABLED flag when comparing tables. Namely, two tables (in two schemas) were reported identical although a foreign key constraint was enabled in one schema and disabled in the other schema.
Am I missing something or is this indeed a bug?
Many thanks,
Bob

Similar Messages

  • SQL Developer 3.1 EA - Database Diff Issues

    Hi
    I am using SQL Developer 3.1 EA to generate database difference script to upgrade my db. This is really very useful and very good tool for compare two different databases and generate the difference script.
    There are few bugs (?) identified while using database diff tool.
    1. If there is a column mismatch in Source and Destination tables, directly drop the table and recreate new one. This is not a good solution for upgrading database with some other database (data loss is the major issue). Microsoft handled this situation in VS2010 to create temp table with new structure then move data to the temp table and finally drop the original table and rename temp table to original. I am expecting the same method in Database Diff also.
    Sample Code:
    --Changed TABLE
    --F_SYSTEM_2
    DROP TABLE "ED9461001ER09_D1"."F_SYSTEM_2";
    CREATE TABLE "ED9461001ER09_D1"."F_SYSTEM_2"
    (     "SYS2_SEQN" NUMBER(9,0) DEFAULT 0 NOT NULL ENABLE, ....
    2. Primary key constraint created with table creation for new tables. But late point of time, Create unique index statement also trying to create the same to lead runtime error.
    Sample Code:
    --New TABLE
    --F_SYSTEM_3
    CREATE TABLE "ED9461001ER09_D1"."F_SYSTEM_3"
    (     "SYS3_CORVU_DB_NAME" VARCHAR2(50),
         "SYS3_CORVU_DB_SCAP" VARCHAR2(8),
         "SYS3_CORVU_DB_VIEWURL" VARCHAR2(2048),
         "SYS3_CORVU_HP_NAME" VARCHAR2(50),
         CONSTRAINT "PK_F_SYSTEM_3" PRIMARY KEY ("SYS3_SEQU") ENABLE
    --New INDEX
    --PK_F_SYSTEM_3
    CREATE UNIQUE INDEX "ED9461001ER09_D1"."PK_F_SYSTEM_3" ON "ED9461001ER09_D1"."F_SYSTEM_3" ("SYS3_SEQU");
    3. If there is an difference in procedures, script generated with two Create Procedure statements (Source and Destination) which is irrelevant.
    --Changed PROCEDURE
    --GET_DI_COUNT
    CREATE OR REPLACE PROCEDURE "ED9461001ER09_D1"."GET_DI_COUNT"      (PP_SEQU int,
    --Changed PROCEDURE
    --GET_DI_COUNT
    CREATE OR REPLACE PROCEDURE EDISAPAC10_D1.GET_DI_COUNT      (PP_SEQU int,
    I am expecting your solution / clarification.
    Regards
    Nagarajan Santhan

    1. Makes sense. You can request this at the SQL Developer Exchange, so other users can vote and add weight for possible future implementation.
    2. Long standing bug. As it won't make your computer explode, apparently low priority to fix.
    3. I'm unable to use the comparison feature in EA3. I do get the progress dialog comparing the different procedures and functions, but when finished it just disappears, and no comparison sheet opens, like the whole operation just got cancelled. No exceptions in the console, just a lot of these in the logging page:
    update returning false for Grid1oracle.ide.Context[{Context.WORKSPACE=Databases.jws, Context.PROJECT=IdeConnections%23DES+-+Reddis.jpr, Context.SELECTION=[Loracle.ide.model.Element;@1353c19, Context.EVENT=null, Context.VIEW=LoggingMessagePane.Logging Page}]Can someone from the team suggest something to debug?
    Thanks,
    K.

  • Sql developer database diff - generate script not working

    Using SQL devleloper 2.1. Database diff generate script gives errors making it completely non-usable
    ORA-31600: invalid input value 0 for parameter SEGMENT_ATTRIBUTES in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 8150
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 9270
    ORA-06512: at "SYS.DBMS_METADATA", line 4757
    ORA-06512: at line 1
    and
    Illegal Lock State: executeOracleQuery requires connection lock to be held. oracle.dbtools.raptor.diff.oracle.table.DiffTableRefConstraints.setup(DiffTableRefConstraints.java:215) called oracle.dbtools.db.DBUtil.executeQuery(DBUtil.java:681) without it
    I do get the differences visually (yes, I am bugged that constraints are not smart enough to compare on content of the constraint....problem when the contstraint names are sys-nnnnnn generated). Just cannot create the script.
    Any ideas to solve this issue? Thanks in advance, Kelly

    Can reproduce same issue in 11gR1.. DIFF works fine in 10gR2.
    I noticed that 10gR2 allows something like:
    DBMS_METADATA.SET_TRANSFORM_PARAM(th,'SEGMENT_ATTRIBUTES',0);
    and 11GR2 returns error similar to error SQLNAVIGATOR returns while running diff:
    DBMS_METADATA.SET_TRANSFORM_PARAM(th,'SEGMENT_ATTRIBUTES',0);
    end;
    Error report:
    ORA-31600: invalid input value 0 for parameter SEGMENT_ATTRIBUTES in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 8424
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 9484
    ORA-06512: at "SYS.DBMS_METADATA", line 3950
    Its safe to assume that this is SQLDEVELOPER bug. Hope it will be addressed sometime.
    Edited by: user5420304 on Jun 15, 2010 10:29 AM

  • SQL Developer 4.0 - Database Diff - turn off schema name in generated script

    SQL Developer 4 / RDBMS 11GR2
    I know SQL Developer 4 is EA, but maybe the question has the same answer in 3.3.  Also if 4.0 EA questions need to be asked in a different forum, please advise.
    I am new to SQL Developer and I admit to using brand Z (TOAD) for many, many years.
    (1) When using Database Diff, is there a setting to turn off the schema name that is displayed in the scripts that are generated?  I looked in PREFERENCES, but if it is there, I did not see it.
    (2) While I have found good resources on SQL Developer, is there a FAQ on Database DIff that answers a lot of these silly type questions?
    Thanks in advance

    On the first screen of the DIFF wizard there's a check box for 'Schema' - uncheck that.

  • SQL DEV DIFF TOOL : OMITS OBJECT IDENTIFIER CLAUSE

    Hi,
    The following is encountered in SQLDeveloper 3.2.20.09 where using Tools > Database Diff... results in DDL that omits the "OBJECT IDENTIFIER IS PRIMARY KEY" clause.
    Test SQL:
    create type dummy_typ as object
      id_num    integer,
      other_num integer
    create table dummy_otbl of dummy_typ
      constraint dummy_otbl_pk primary key ( id_num ) using index
      object identifier is primary key;
    When the diff tool generates the create table script it creates it but omits the OBJECT IDENTIFIER IS PRIMARY KEY clause. 
    Example:
      CREATE TABLE "AIMS_FEATURES"."DUMMY_OTBL" OF "AIMS_FEATURES"."DUMMY_TYP"
      ( CONSTRAINT "DUMMY_OTBL_PK" PRIMARY KEY ("ID_NUM") ENABLE
    Is this a Bug of sorts? Thanks in advance for your responses
    Cheers,
    Anand

    Possibly.
    What's the DDL for the object you're comparing it to, or is it just 'missing?'
    I'm looking at the DDL generated for the object in the object editor and it's including the phrase so the DIFF should also pick that up.
      CREATE TABLE "HR"."DUMMY_OTBL" OF "HR"."DUMMY_TYP"
       ( CONSTRAINT "DUMMY_OTBL_PK" PRIMARY KEY ("ID_NUM")
      USING INDEX (CREATE UNIQUE INDEX "HR"."DUMMY_OTBL_PK" ON "HR"."DUMMY_OTBL" ("ID_NUM")
      PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "USERS" )  ENABLE
       ) OBJECT IDENTIFIER IS PRIMARY KEY
       PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
    NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "USERS" ;

  • Sql developer database diff generating incorrect diff scripts

    I am wondering whether this may have to do with incorrect preference settings. Note I am NOT diffing 2 schemas that I log in as. That shouldn't matter. I log in as a DBA user.
    I am getting alot of alter statements such as
    alter table add constraint NOT NULL
    This errors out because the table already has a NOT null constraint.
    I then checked both databases to make sure I didn't run my diffs in the wrong direction. Both databases have this NOT NULL constraints.
    I just checked a create table statement. The table exists in both databases. What am I missing here? Is there some setting in preferences about how database diff works?

    Can reproduce same issue in 11gR1.. DIFF works fine in 10gR2.
    I noticed that 10gR2 allows something like:
    DBMS_METADATA.SET_TRANSFORM_PARAM(th,'SEGMENT_ATTRIBUTES',0);
    and 11GR2 returns error similar to error SQLNAVIGATOR returns while running diff:
    DBMS_METADATA.SET_TRANSFORM_PARAM(th,'SEGMENT_ATTRIBUTES',0);
    end;
    Error report:
    ORA-31600: invalid input value 0 for parameter SEGMENT_ATTRIBUTES in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 8424
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 9484
    ORA-06512: at "SYS.DBMS_METADATA", line 3950
    Its safe to assume that this is SQLDEVELOPER bug. Hope it will be addressed sometime.
    Edited by: user5420304 on Jun 15, 2010 10:29 AM

  • Database Diff script creates redundant indexes and fails

    In Version 4.1.0.18, I create a table such that the primary key constraint and unique index have the same name:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2 BYTE),
           "COMPANY_ID" NUMBER(5,0),
           CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID", "COMPANY_ID") ENABLE
    The DDL export of this table yields a different approach but the same end results:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2 BYTE),
           "COMPANY_ID" NUMBER(5,0)
        CREATE UNIQUE INDEX "PK_MY_TABLE" ON "MY_TABLE" ("CORP_ID", "COMPANY_ID");
        ALTER TABLE "MY_TABLE" ADD CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID", "COMPANY_ID") ENABLE;
    Perfectly fine - no issue there.
    But if I do a complete Database Diff (all object types) and the target database is missing the table, the resulting script uses a combined approach:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2) NOT NULL ENABLE,
           "GL_ACCOUNT" VARCHAR2(16),
           CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID","COMPANY_ID") ENABLE
       CREATE UNIQUE INDEX ."PK_MY_TABLE" ON "MY_TABLE" ("CORP_ID","COMPANY_ID");
    In this script, the CREATE TABLE will correctly create both the constraint and index.  Therefore the CREATE INDEX fails because the index already exists.

    In this script, the CREATE TABLE will correctly create both the constraint and index.  Therefore the CREATE INDEX fails because the index already exists.
    Can't help you beyond saying that is a bug since the DIFF should NOT do both of those.
    Someone from the sql dev team will need to tell you if the bug is in sql dev or the package sql dev is using to do the diff.
    Can you open the log window and review the SQL being generated/executed by sql dev?
    Sql Dev is likely using the DBMS_METADATA_DIFF package to generate the diff:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_metadiff.htm
    If they are using it correctly but you get that error then it is an Oracle DB bug that needs to be filed.
    If sql dev is using the package incorrectly then sql dev has a bug and the team can address that.
    Sorry I can't help you more.

  • When comparing database tables with lob columns via "Database diff" in different environments indexes are shown as different

    When using "Database diff" selecting other schemas only for compare own objects are shown too!Hi!
    For tables with lob columns (clob, blob, etc.) indexes with system names are automatically created per lob column.
    If I am on different database instances (eg. dev/test) these system names can differ and are shown as differences, but these is a false positive.
    Unfortunately there is now way to influence the index names.
    Any chance to fix this in sql developer?
    Best regards
    Torsten

    Only the Sql Dev team can respond to that question.
    Such indexes should ONLY be created by Oracle and should NOT be part of any DDL that you, the user, maintains outside the database since they will be created by Oracle when the table is created and will be named at that time.
    It is up to the Sql Dev team to decide whether to deal with that issue and how to deal with it.

  • Export arabic character into csv file turns into question mark in sql dev

    Hi,
    I am trying to export a table's output that contains some arabic and english mixed data, when I try to export it in csv, all the arabic characters change into question mark (?) but the same export is working fine on .xls or .xlsx.
    Since we have to export a huge data and csv is much faster thar .xls, kindly let me know why it is happening and what is the solution for this.
    Well, we are on Oracle 11gR2 and Sql Dev is 3.1
    Appreciate your time and experience sharing.
    Regards.

    Hi,
    Since you say it works for xls but not csv, and the only applicable preference setting ( Tools|Preferences|Database|Utilities|Export|Encoding ) should apply to all export formats, I would imagine this is a bug. Especially if the encoding specified in Preferences is consistent with the client OS settings. I was not able to find any prior bug logged against the Export utility for this issue.
    I logged a bug for this:
    Bug 13993410 - FORUM: ARABIC CHARACTER ENCODING RESPECTED FOR XLS BUT NOT CSV
    Regards,
    Gary
    SQL Developer Team

  • SQL Dev 1.5.4+: Scripting DDL and data dumps?

    In SQL Dev 1.5.4, can I script a DDL and data dump? If not, what about 2.0? If not 2.0, has anyone requested this functionality so I can vote for it? I find it frustrating that, while doing a Database Export, I can't even pre-declare (e.g. save) the set of objects I want to dump; sometimes, you want to selectively dump, and it's a pain to hunt and peck and select just those you want to dump. Easy if you want to dump everything but 2-3 objects in a large schema. Not so easy if you only need, say, 20 out of 100 objects to be dumped (e.g. for domain or configuration tables--some subset of the whole schema).
    I'm really enjoying SQL Developer 1.5.4 by the way. Despite it's flaws, I'm pretty happy with it. Looking forward to 2.0 and beyond. Good work SQL Dev team.
    Thanks very much.
    Dana

    They're all command line tools, so they can all be wrapped up in a batch or shell script. Bummer you can't access them... Hope you find a better solutionThanks K. I should be getting Oracle 10g Express Edition on my desktop soon--critical because we don't have full access to the Development instance. It's like putting changes through a straw over to the DBAs. I'm not sure why Development is locked-down to developers, but that's the way it is.
    Any chance that Oracle 10g Express Edition comes with scriptable data pump binaries? Will still need authorization, but maybe that's one way to go. I hate trying to write my own Data Pump in Python or any other language. It's seems a bit absurd to me but I suppose there are reasons.
    Dana

  • 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

  • Database Diff not working using 3.1 - 64 bit

    Hi there,
    I have just tried using the utility Database Diff in 3.1 on windows 64-bit and this does not produce any differences between 2 similar schemas. I have just downloaded 3.1 32-bit (Java included) and this works fine. I am running Windows 7 64bit.
    Any ideas?
    Regards,
    VicC

    I have managed to sort this out, I was trying to speed up the startup of SQL Developer and disabled some of the extensions. The crucial one here is Versioning support. This must be enabled for Database Diff to work.
    Regards,
    VicC

  • 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 !]

  • 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

  • Database Diff Wizard Tool problem

    Using Oracle SQL Developer 1.5.1 Build 5440.
    Third Party Extension jtds-1.1.2.jar
    I'm trying to determine if the Database Diff Wizard Tool contains functionality to allow/support diff compares between objects found in an Oracle Db instance and objects found in a MSSQL 2005 Db instance? I've established successful connections to each of the Db instances and can open/browse each one via the Connections browser. If compares between Oracle and MSSQL Db objects (vs. Oracle-to-Oracle only) are supported I must not have something configured correctly. Upon opening the Diff Wizard, (Tools --> Database Diff) and clicking on either the Source Connection or Destination Connection drop-downs only my Oracle Db connected instances are listed for selection. Could someone with experience using the Diff Wizard Tool offer assistance? (Provided SQL Developer supports this function).
    Thanks!

    Folks,
    I'm trying to compare two tables using Oracle SQL Developer, but I'm not being successful. :-(
    The tables are the same, but they are placed in two differente environments: development and production.
    Every time we need to make changes, we do it firstly at development environment. And I need to know which differences don't exist yet in production environment.
    Everytime I try to compare tables, I always receive a diff report with just one difference, like below:
    Type | Owner | Name | Change | Diff Count
    Table SINFA Artesao CREATE 1
    And in the the details window, there's the DDL of the table (source connection).
    Does someone have any idea of what's the problem?
    Thanks,
    Auler.

Maybe you are looking for

  • Free item & Conditions

    Dear Experts, I created a free item in the PO but the problem is i want to add value conditions to it .. the condition tab in the item details doe not exist .. but i used the condition tab in the header .. and i did a GR against this PO .. but no FI

  • Problem with exported JPGs from InDesign (CS6 and CC): double rows of pixels

    We are using a javasscript  for exporting cropped pictures out of our InDesign Layouts. But there is a problem that comes witch each file. No matter what wie change in the export options, it always appears. It seems like there is one row of pixels tw

  • Thumbnails Not Appearing in Finder

    I posted this in the Leopard forumn, but I haven't gotten any response. I hope someone here can help. I am having a strange problem with image thumbnails not appearing in Finder. I am editing some very large TIF files on a Macbook that is running Lio

  • Problem w/ Netbeans genereted jar file

    Hi, My java application runs fine in the netbeans IDE. I had problems with the jar file it created a while back which turned out to be that i had an older version of JRE still installed. Anyway they worked fine until recently, when i started geting t

  • My ipad can not download itune

    my ipad can not go into the itune store