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" ;

Similar Messages

  • I can compile objects with SQL dev tool but not with a direct sql

    hi,
    This is a bit weird - I'm probably not familiar enough with Oracle's compilation process...
    I'm creating a some functions / procedures / triggers. When I run the script to create them with Oracle's SQL Developer tool, usually they become immediately valid, and if not then I can manually right click them and choose Compile, and they're compiled correctly and become valid.
    However, when running them with command line tools, they're uncompiled after created. I'm trying compile them with
    ALTER PROCEDURE / FUNCTION / TRIGGER MySchema.MyFunction COMPILE;
    and it always returns
    Error starting at line 1 in command:
    alter function MySchema.MyFunction compile
    Error report:
    SQL Command: alter function
    Failed: Warning: execution completed with warning
    alter function MySchema.MyFunction succeeded.
    and the object remains uncompiled / invalid.
    also tried with DBMS_... utils and got the same results.
    Same with adding things such as PLSQL_WARNINGS = 'ERROR:ALL' to the stmt
    But when I go in SQL Developer to the object, right click and click Compile, it compiles fine w/o warnings / errors and becomes valid.
    Is there anything else I should run other than this alter..compile? Is SQL Dev tool doing something different than "alter function ... compile" when right clicking and object and clicking "Compile"?
    thanks!

    hi,
    I'm having difficulties connecting with SQL Plus, since it seem to require at startup some admin user/password, which I don't have at the moment. Also tried to give it in command line the db name and params and it still require this pass... Will try to get it...
    But again, when I'm right clicking the object in SQL Developer and click Compile, it compiles fine and becomes valid. After doing that, running
    alter function mySchema.MyTestFunction compile;
    passes with
    "alter function mySchema.testfunction succeeded"
    If I run this sql before doing compile with SQL Developer, it fails with what I posted before.
    I wonder if SQL Developer does things other than the above compile stmt.
    If I right click on Functions in SQL Dev and click Compile All or Compile Invalid, I can see the sql it about to generate, and it's the same as I tried - and fails as well... Only when right clicking the object and Compile it works...
    A test func I tried, for example:
    create or replace
    FUNCTION testFunction(n in number)
    RETURN NUMBER
    IS
    BEGIN
    RETURN n + 1;
    END;

  • Oracle Personal Edition and SQL dev. tool

    I installed Oracle 10g Personal Edition on my laptop and want to use SQL Creator (SQL developer's tool/program - http://www.snefru.com/index.jsp) with it.
    I'm trying to setup my SQL developers tool to connect to my local Oracle database and there is a connection wizard for the SQL program which prompts me:
    1.) "Select a JDBC driver..."
    2.) "Enter Host name for the server that the database is located on...."
    3.) "Enter Port number that the database is listening on...."
    4.) "Unique SID of the database instance..."
    How can I find out 1.) - 4.) for my specific, local database?
    Thanks in advance...

    When you run SQL*Plus, what is the version number displayed:
    C:\>sqlplus
    SQL*Plus: Release 9.2.0.3.0 - Production on Tue Nov 22 17:11:44 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Enter user-name:?
    You woudl download the driver that matches with that release.
    if you did the database install, chances are you already have the jdbc driver installed.
    Do you have a directry ORACLE_HOME/jdbc/lib ?
    Do you have files like classes*.jar in that directory?
    if you do you already have the jdbc driver files.

  • 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

  • Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier

    Hi everyone,
    we are facing the below issue when trying to schedule a BI report.
    Error Details:
    +oracle.apps.xdo.servlet.scheduler.ProcessingException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:830)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.scheduleJob(SchedulerServlet.java:1896)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.doPost(SchedulerServlet.java:293)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)+
    +     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)+
    +     at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)+
    +     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)+
    +     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)+
    +     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)+
    +     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)+
    +     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)+
    +     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)+
    +     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)+
    +     at java.lang.Thread.run(Thread.java:595)+
    +Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:296)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:724)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:790)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:524)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeCall(AbstractSession.java:795)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:222)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:202)+
    +     at oracle.toplink.queryframework.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:55)+
    +     at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)+
    +     at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)+
    +     at oracle.toplink.sequencing.QuerySequence.update(QuerySequence.java:319)+
    +     at oracle.toplink.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:258)+
    +     at oracle.toplink.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:62)+
    +     at oracle.toplink.sequencing.DefaultSequence.getGeneratedVector(DefaultSequence.java:144)+
    +     at oracle.toplink.sequencing.Sequence.getGeneratedVector(Sequence.java:256)+
    +     at oracle.toplink.internal.sequencing.SequencingManager$Preallocation_Transaction_NoAccessor_State.getNextValue(SequencingManager.java:444)+
    +     at oracle.toplink.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:873)+
    +     at oracle.toplink.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:75)+
    +     at oracle.toplink.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:234)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.assignSequenceNumbers(UnitOfWorkImpl.java:419)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:497)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1407)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1167)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:939)+
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:815)+
    +     ... 16 more+
    Caused by: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)+
    +     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)+
    +     at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:113)+
    +     at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:561)+
    +     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)+
    +     at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1585)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:713)+
    +     ... 45 more+
    Found a thread related to this but there it was explained that the error was occuring when trying to notify regarding output through email. In our case, issue is occuring just during scheduling itslef.
    Also I haved checked the following schedular tables in my database.
    SQL> select table_name from all_tables where table_name like 'S_NQ%'
    +2 /+
    TABLE_NAME
    S_NQ_ERR_MSG
    S_NQ_INSTANCE
    S_NQ_JOB_PARAM
    S_NQ_JOB
    SQL> select SEQ_NAME.CURRVAL FROM DUAL;
    select SEQ_NAME.CURRVAL FROM DUAL
    *+
    ERROR at line 1:
    ORA-02289: sequence does not exist
    Please help me out in solving this as I have tried almost all possible solutions.
    Thanks,
    Sri Harsha.
    Edited by: user10545574 on Dec 20, 2009 10:24 PM

    Hello,
    In the delivery email configuration server page (under BI Publisher Admin Tab), the username / password to enter is the one defined on the email server itself. It is the user that will be user to send the emails when scedhuling a report.
    It may not be Administrator/ Administrator (not a user defined with OBI admin tool) but the username/password defined on the email server itself.
    Moreover, to properly configure the BI Publisher Scheduler, it is a prerequistes to create bipsched user on Oracle DB and install the schema tables in Oracle DB (by clicking on Install Schema button after defining database connection under Admin / Scheduler Configuration tab)
    From the error your are getting 'SEQ_NAME unknown..., it appears that the tables are not created'.
    Hope this helps and good luck
    Matthieu

  • V1.5.3 - 'diff' tool flags things as different when they are the same

    Using the 'diff' tool to compare databases. Resultant 'diff' script contains a lot of statements like this :
    ALTER TABLE "tabl1" MODIFY ("column1" NOT NULL ENABLE);
    .. but when i run them on the target, it tells me that the columns are already not null. No, i'm not running on the wrong db. In fact running that command on both the source and destination dbs elicits the same error :
    Error starting at line 1 in command:
    ALTER TABLE "tabl1" MODIFY ("column1" NOT NULL ENABLE)
    Error report:
    SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
    01442. 00000 - "column to be modified to NOT NULL is already NOT NULL"
    *Cause:   
    *Action:
    Additionally, the 'diff' script when asked to compare functions includes the function definition in it's output. However running that on the target and then re-running the diff still flags that function as different.

    Further, i had a table defined in both db, same columns different column lenght :
    CREATE TABLE CDB_R_FIRMS_ADDRESSES
    INT_FIRM_ID INTEGER NOT NULL,
    ADDRESS_UUID VARCHAR2*(50 CHAR)* NOT NULL,
    ADDRESS_TYPE INTEGER NOT NULL
    CREATE TABLE CDB_R_FIRMS_ADDRESSES
    INT_FIRM_ID NUMBER NOT NULL,
    ADDRESS_UUID VARCHAR2*(200 BYTE)* NOT NULL,
    ADDRESS_TYPE NUMBER NOT NULL
    .. and 'diff' failed to spot the difference! If 'diff' does not consider '50 char' different to '200 byte', what does it consider a difference ?Am i not using 'diff' as it was intended ?

  • Problem with object view with primary-key based object identifier

    Hello!
    I met such problem.
    t1 is persinstent-capable class:
    class t1 : public PObject { .... };
    T1OV is object view, based on object table T1OT
    I1 is primary key of the table T1OT.
    Next code:
    t1* t = new (conn, "T1OV") t1(...);
    conn->commit();
    try
    t->markDelete();
    conn->commit(); // exception throws here
    Works fine if T1OV defined as:
    create view t1ov of t1 with object identifier default
    as select * from t1ot;
    And throws an exception
    "ORA-22883: object deletion failed"
    if:
    create view t1ov of t1 with object identifier (I1)
    as select * from t1ot;
    Such problem also occurs when object view is based on relational table/view (OID is primary-key based).
    Also it occurs when
    t->markModified() used insted of t->markDelete()
    I am using Oracle 9i second release for windows and
    MS VC++
    Thank You

    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_85a.htm#2065512
    You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.
    Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.
    Restrictions on View Constraints
    View constraints are a subset of table constraints and are subject to the following restrictions:
    You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
    View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
    You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
    You cannot define view constraints on attributes of an object column.
    Rgds.

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

  • SQL Dev 2.1:Ability to save and load visual query models?

    At SQL Dev 2.1, do we now have the ability to save and load visual query models as with TOAD? Or has that functionality been rolled into the for-pay Data Modeler extension? Seemed strange to hide the functionality deep within SQL Worksheet, then not allow query models to be saved or loaded. From what I recall, load/save was scheduled to be in 2.0.
    I've not yet downloaded and installed 2.1, but also as I recall, it was promised to be a significant (e.g. new-feature rich) release. Has it lived up to that promise? Hoping also that it's not so buggy as to not merit an upgrade. At my workplace, folks have different versions of SQL Dev 1.X installed, each for the purpose of retaining functionality that got broken in future releases, etc. Would love to be able to advise them to retire their 1.X installs in favor of 2.1.
    Edited by: Dana N on Jan 21, 2010 6:45 AM

    Dana, We are working on the query builder. We have not done anything with it in recent releases as we knew that it needed completely overhauled and a
    couple of bug fixes were not going to give us the query builder we needed. Sue will be able to tell you more as the we get closer to releasing it as a feature.Thanks Barry. I know it's probably impossible to give firm dates, but my colleagues would love to know, ballpark, when query builder might be ready. Any particular year/quarter that's targeted for?
    A lot of the bugs in the 2.1 are probably my fault as we decided to build a framework which allowed tasks to be scheduled like eclipse and push them to the
    background. Coupled with this, we tore apart the worksheet to allow us to fit tasks in, but to also give us the ability to do some of the enhancement requests
    that you guys, our users, have been asking for. While its not perfect, I believe its getting much better from both a functionality and performance standpoint. The
    worksheet will not change again and there are no enhancements logged or scheduled which will do that. The issues that have come as part of 2.1 are being
    addressed and we are fixing the highest priority ones as we speak. One of my priorities is to make these components as rock solid as possible.Thanks again. It really is a nice tool to work with, and I'm grateful to have it. I would choose stability for existing features over new ones, but I suppose there always has to be a balance in development. What was really scary in the past was getting bizarre / wrong answers in query results--that's a complete show stopper; e.g. clicking on a row/col intersection in a result set row would show strange and false values. New features can wait, but core functionality must be solid. If one can't presume integrity of query results, it's game over--using a version of SQL Developer that returns inconsistent result sets between runs could be Considered Harmful, or so it is to me.
    Anyway, thanks for responding and I hope Oracle Corp gets you whatever assistance you need to improve the quality of existing functionality while adding new features; with one not being at the expense of the other. :-) Glad also to see Sue has authored a book on the tool. Hopefully that will drive customer demand and force increased allocation of development resources toward the product. I'd like to think having out-of-the-box tools that are a joy to use might even increase market share.
    Data Modeler I would love to use, but am completely priced out of it. Enterprise Architect from Sparx Systems is the best value there so far as I can tell.
    Dana

  • SQL functions in TOOL code

     

    In my original email I should have made the point clear that an indexed
    column was required, that led to some confusion, apologies.
    Under Oracle 7 even if the column is indexed the query engine still does a
    full scan of the index to find the maximum or minimum value. As strange as
    this seems it is possible to view it using the Oracle trace functions such
    as tkprof. This method is quicker than not having an index but the cursor
    method is far more efficient.
    When using a cursor based approach Oracle will go straight to the first
    record of the index (depending on MAX or MIN) and retrieve the data. By
    exiting at that point the function has been performed and the I/O operations
    are extremely low compared to a full index scan.
    Of course there is a trade off depending on the amount of rows but for large
    indexed tables the cursor approach will be far faster than the normal
    functions. I'm not sure how other RDBMS's handle MAX/MIN but this has been
    my experience with Oracle. This process may be faster still by using PL/SQL
    but then you are incorporating specific database languages which is
    obviously a problem if you port to a different RDBMS. Here is some code you
    can try for Oracle PL/SQL functions:
    declare
    cursor myCur1 is
    select number_field
    from number_table
    order by number_field desc;
    begin
    open myCur1;
    fetch myCur1 into :max_val;
    close myCur1;
    end;
    I hope this clarifies things a bit more. If in doubt of the execution plan
    of a performance critical query use the database trace functions as they
    show up all sorts of surprises. MAX and MIN are easy to understand when
    viewing code but perform poorly under Oracle, whether v8 behaves differently
    I have yet to discover.
    Cheers,
    Dylan.
    -----Original Message-----
    From: [email protected] [mailto:[email protected]]
    Sent: Thursday, 7 January 1999 3:37
    To: [email protected]
    Subject: RE: SQL functions in TOOL code
    I guess my point is that MAX can always be implemented more
    efficiently than the SORT/ORDER-BY approach (but may not be the
    case, depending on the RDBMS). If an ORDER-BY
    can use an index (which means that the indexing mechanism involves
    a sorted collection rather than an unordered hashtable) so can
    MAX - in which case finding a MAX value could be implemented
    in either O(1) or O(logn) time, depending on the implementation.
    The last sentence being the major point of this whole discussion,
    which is that your mileage may vary depending on the RDBMS - so
    try using both approaches if performance is a problem.
    In terms of maintenance, MAX is the much more intuitive approach
    (In My Opinion, of course), since a programmer can tell right away
    what the code is attempting to do.
    Chad Stansbury
    BORN Information Services, Inc.
    -----Original Message-----
    From: [email protected]
    To: [email protected]; [email protected]; [email protected]
    Sent: 1/6/99 10:45 AM
    Subject: RE: SQL functions in TOOL code
    Well, yes, but in that specific case (looking for max() value) would not
    be
    true that, if you have an index (and only then) on that specific column
    some
    databases (like Oracle) will be smart enough to use index and find max
    value
    without full table scan and without using order by clause?
    Dariusz Rakowicz
    Consultant
    BORN Information Services (http://www.born.com)
    8101 E. Prentice Ave, Suite 310
    Englewood, CO 80111
    303-846-8273
    [email protected]
    -----Original Message-----
    From: Sycamore [SMTP:[email protected]]
    Sent: Wednesday, January 06, 1999 10:29 AM
    To: [email protected]; [email protected]
    Subject: Re: SQL functions in TOOL code
    If (and only if) an index exists on the exact columns in the ORDER BY
    clause, some databases are smart enough to traverse the index (inforward
    or
    reverse order) instead of doing a table scan followed by a sort.
    If there is no appropriate index, you always end up with some kind ofsort
    step.
    Of course this is all highly schema- and database-dependent, so youmust
    weigh those factors when deciding to exploit this behavior.
    Kevin Klein
    Sycamore Group, LLC
    Milwaukee
    -----Original Message-----
    From: [email protected] <[email protected]>
    To: [email protected] <[email protected]>
    Date: Wednesday, January 06, 1999 9:40 AM
    Subject: RE: SQL functions in TOOL code
    This seems a bit counter-intuitive to me... primarily due to
    the fact that both MAX and ORDER-BY functionality would require
    a full table scan on the given column... no? However, I would
    think that a MAX can be implemented more efficiently since it
    just requires the max value in a given set (which can be performed
    in O(n) time on an unordered set) versus an ORDER-BY (sort)
    performance on an unordered set of at best O(nlogn) time.
    Am I missing something? Please set me straight on this 'un.
    Chad Stansbury
    BORN Information Services, Inc.
    -----Original Message-----
    From: Jones, Dylan
    To: 'Vuong, Van'
    Cc: [email protected]
    Sent: 1/5/99 4:42 PM
    Subject: RE: SQL functions in TOOL code
    Hi Van,
    Operating a function such as MAX or MIN is possible as given in your
    example
    but it is worth pointing out the performance overhead with such a
    method.
    When you use MAX, Oracle will do a full table scan of the column so
    if
    you
    have a great many rows it is very inefficient.
    In this case use a cursor based approach and depending on your
    requirments
    (MAX/MIN) use a descending or ascending ORDER BY clause.
    eg.
    begin transaction
    for ( aDate : SomeDateDomain ) in
    sql select DATE_FIELD
    from DATE_TABLE
    order by
    DATE_FIELD DESC
    on session MySessionSO
    do
    found = TRUE;
    aLatestDate.SetValue(aDate);
    // Only bother about the first record
    exit;
    end for;
    end transaction;
    On very large tables the performance increases with the above method
    will be
    considerable so it is worth considering which method to use whensizing
    your
    database and writing your code.
    Cheers,
    Dylan.
    -----Original Message-----
    From: Vuong, Van [mailto:[email protected]]
    Sent: Tuesday, 5 January 1999 6:50
    To: [email protected]
    Subject: SQL functions in TOOL code
    Is it possible to execute a SQL function from TOOL code?
    For example:
    SQL SELECT Max(Version) INTO :MyVersion
    FROM Template_Design
    WHERE Template_Name = :TemplateName
    ON SESSION MySession;
    The function in this example is MAX().
    I am connected to an Oracle database.
    Thanks,
    Van Vuong
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    >
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • 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"

  • SQL Dev result fetch performance

    I am using SQL Developer 1.2.0-Main 29.98
    My dept. is looking to save the cost of TOAD renewal, but evaluators have raised the following issue:
    Using a test query in both TOAD and SQL Developer, it takes 2x longer in SQL Dev to retrieve all rows (7864). Both tools return n first rows quickly, but using CTRL-A in SQL Dev to force the worksheet to display all the rows takes 88sec. with Sql Array Fetch Size=50, improving incrementally to a fastest 64 sec. with the Size = 5000. (It also lets me set the size even larger, even though the documentation says 5000 is the max, no improvement in performance though.) TOAD, using it's minimum memory threshhold method returns the data in 32 sec.
    Are there any additional configuration changes I can make? I am a DBA, not a Java developer, so I have no knowledge of memory settings, etc. that can be defined for the Java environment.
    I have seen in other threads that 2.0 is under development, is this performance issue already being addressed?
    Any and all advice is appreciated, otherwise it's back to evaluating PL/SQL Developer.

    If you want performance and no hassle, stick with the proven, robust TOAD. Period. The rest can be called wannabees.
    Sqldev is still too young, has performance issues, crashes, has bugs, uses a lot of mem, ... but promises to be really competitive with TOAD in the future.
    I do prefer sqldev's code editor and debugger over TOAD's and has a modern Java interface, easy customizable through user extensions in XML, and most important: it's Oracle and free. But you do need to put in a lot of patience and frustration...
    Regards,
    K.

  • Usage of diff tool

    I need to use the diff tool to compare two files and print only different lines from the second file. Identical lines will be ignored. Can someone help me out?
    I have been reading the manpage and experimenting for a few hours but the search does not turn out the way I expected.

    user@host ~
    $ echo "
    line1
    line2
    Line3
    linefour" > test1
    user@host ~
    $ echo "
    line1
    line2
    line3
    line4
    line5" > test2
    user@host ~
    $ diff -u test1 test2
    --- test1 2007-06-27 00:19:13.000000000 -0600
    + test2 2007-06-27 00:21:57.000000000 -0600
    @@ -1,5 +1,6 @@
    line1
    line2
    -Line3
    -linefour
    +line3
    +line4
    +line5
    user@host ~
    $ diff -u test1 test2 | grep ^+
    + test2 2007-06-27 00:21:57.000000000 -0600
    +line3
    +line4
    +line5
    ================
    Of course, you can pipe all of that into
    | grep -v "+ test2"
    to eliminate the header line as well.
    Not sure if that is what you're looking for; sorry if I grossly simplified your question.
    I'm not sure what problem you're actually trying to solve, but I imagine this concept would only be useful for identifying line edits, not line movements or more significant changes.
    Why -u on diff? just a habit for me ... I use Subversion and unified diff is its format of choice.
    If this indeed is what you're looking for you may want to research the "Unix Philosophy:" small tools designed to work together with text.
    If your trying to do something more sophisticated than what I'm assuming, sorry to point out the obvious. Perhaps you could give a more full description of your problem if this is the case.

Maybe you are looking for

  • How to change the behaviour of the Cancel-Button of SSO-Login-Page (Forms)?

    Hi Folks, we use SSO-Login to authenticate users using Forms. How do I change the URL which is opened when a user clicks on the cancel button on the SSO Login page? In the formsweg.cfg file there is a parameter named ssoCancelUrl, but if I define it,

  • Can I use a Time Capsule as an external hard drive only?

    I want to use a Time Capsule just to back up my Mac every so often, but I don't want to use any of its wifi features or plug it into my modem. How can I do this?

  • Webutil and XP

    Hi, We have a form in which we use the call web.show_document(l_url, '_blank'), where l_url is a location of an html file on a local pc. Then in a seperate browser the html file is shown.This works fine for our application. Now some users are migrate

  • Library 7EE

    Hello all, I am trying to create a report painter report which displays all the cost components on the columns and materials along the rows. I have chosen structure KKBE library 7EE to accomplish the task. However I cannot come up with the report I w

  • Installing Oracle9i Database Release 2 Over Solaris 9

    The documentations reference for installing Oracle 9i Release 2 makes reference to Solaris 8, so, the patches set needed apply for solaris 8 not for Solaris 9. Does any body help me to find documentions for installing Oracle 9i Release 2 over solaris