Query on Database Vault

Hi,
I am new to Database Vault, and I have set it up in a test environment to explore it.
I have a question because my setup is behaving little differently compared to what a book says.
From what I am reading in the book, it says after setting up Database Vault, I should not be able to connect to the database using '/ as sysdba' - but I can.
Here is what book says -
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Jan 4 15:54:51 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges
And here is what I see in my environment -
[home/oracle] sqlplus
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Sep 14 15:52:13 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL>
Any idea what I can be missing here?
Thanks,
HJ

Hi
see this post
Database Vault on RAC

Similar Messages

  • Database Vault Question on a Test Server

    I have a question about database vault. Say I have Database Vault protecting the DBA from viewing table XYZ in producion. If the DBA takes a backup of the production database and clones it onto another test server is table XYZ still protected on that test server? Or because Database Vault is not running against this test server does that mean that the table is wide open now for the DBA to see? Thanks for any help on this.
    Edited by: jeff81 on Nov 18, 2010 12:25 PM

    findhorn wrote:
    > I wondered if the mysql_query function needed a
    reference to
    > the database?
    No, mysql_query() just needs the query. Your problem lies
    with quotes in
    the query itself. A couple of the values are not in quotes.
    There should
    also not be a comma before WHERE.
    $query_updateAvailability = "UPDATE tbl_availability
    SET
    satStatus='".mysql_real_escape_string($_POST['satStatus'])."',
    sunStatus='".mysql_real_escape_string($_POST['sunStatus'])."'
    WHERE
    availabilityId='".mysql_real_escape_string($_POST['availabilityId'])."'";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Database Vault on e-Business suite R12

    Hi,
    As i know, database vault prevents even DBA's from querying the critical data from the database. Can somebody please tell me what advantage does database vault on e-business suite offers in terms of security. I have installed vault on my e-business R12 database?
    If DBA has password for both system and apps schema, they he can access any critical information from the e-business suite database.
    Thanks,
    Prasad

    Prasad,
    Did you review "Section 1: Overview" in the following note? I believe it answers your question.
    Note: 744363.1 - Integrating Oracle E-Business Suite Release 12 with Oracle Database Vault 10.2.0.3
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=744363.1
    In addition, please review the following links.
    Oracle Database Vault 10.2.0.3 Certified with Apps 12
    http://blogs.oracle.com/stevenChan/2008/05/oracle_database_vault_10203_ce.html
    Oracle Database Vault
    http://www.oracle.com/database/database-vault.html
    Remember, someone always has the key (as mentioned in the other thread), which means the Realm Owner (created in Oracle Database Vault) has access to the Realm schemas.
    Using Oracle Database Vault 10gR2 With Apps 11i
    http://blogs.oracle.com/stevenChan/2008/02/using_oracle_database_vault_10.html
    Oracle® Audit Vault Administrator's Guide Release 10.2.3.1
    http://download.oracle.com/docs/cd/E13850_01/doc.102/e13841/toc.htm
    Regards,
    Hussein

  • How to query a database file on my hard drive?

    Hi,
    I have a filer called "server.dbs" on my hard drive. It is a database file. I use a simple program that allows you to view databases, and it loads up and I can traverse the database and see all the entries as any standard database.
    So I figured that Java's ability to handle SQL would allow me to make a standard SQL statement querying the database, and be able to get the results. The software stores servers in SID fields, and the value is the port the server runs on. I want to make a simple query to select a server by SID, and print the port in which that server is running on.
    So is there any way to, via my java application, load a database from a file (rather than a url) which has no authentication required, and simply make my queries directly to that file? If so, how?
    Thanks!
    -Josh

    Normal database access is via JDBC.
    http://java.sun.com/docs/books/tutorial/jdbc/index.html
    To use that JDBC driver is needed to access the database. Databases in wide usage all have one. It isn't clear from your posting that you have a common database though.

  • Build dynamic SQL query in Database Adapter.

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Error while installing Oracle grid/Database vault in win XP service pack3

    Hi,
    I am trying to install oracle database grid 10.2.0.2 in win xp service pack 3. It's giving the below error.
    "Could not find the main class. Program will exit"
    When I am installing Database grid 10.1.0.3 it's getting installed.
    I also have java 1.5 installed in my system.
    I am getting the same error while installing Database vault.
    Where ever it's asking for the below JRE_LOCATION in "oraparam.ini" file I am getting the error.
    JRE_LOCATION=../stage/Components/oracle.swd.jre/1.4.2.8.0/1/DataFiles

    JRE_LOCATION=../stage/Components/oracle.swd.jre/1.4.2.8.0/1/DataFilesPost the complete path,where the patchset is located. Make sure there's no space in the directory path. The same applies to the ORACLE_HOME directory.
    Werner

  • Can a web service query a database at set intervals?

    Can someone verify if this is feasible?
    I need to display live data via browsers .  I would like to have the query to the database executed server side and have the web service provide the data to the browsers.
    Here is what I propose :
    I would like to have a web service run on a web server for an intranet.
    Have the web service  query a database every 20 seconds and update the data into a table or an array variable. 
    On the browser side I want the browser to refresh every 20 seconds with the updated data from the web service.
    Any other recommendations would be greatly appreciated.
    Thank you.
    Chris W.

    Hi ChrisTW1,
    Thank you for posting in MSDN forum.
    Based on your issue, I suggest you can try to use the JS to call the web service to set the intervals. For more information about how to use the JS to call the web service to set the intervals, please see:
    http://www.codeproject.com/Tips/647322/Calling-ASP-NET-Webservice-using-JavaScript-on-Reg
    In addition, since
    this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. If you have any issues about the set the
    intervals for the web service, I suggest you can post this issue directly to the WCF forum:https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf, maybe
    you will get more help.
    Hope it help you!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Query distributed database with different character sets.

    Hello experts, this is my situation:
    I have two databases A and B, the same version 11.1.0.7, the same OS Suse Linux Enterprise 10 but with different character sets, A has WE8MSWIN1252 while B has AL32UTF8. The database B is my XML DB repository so there I have some XML type tables. I need to query this tables from the database A using a dblink and in fact I have done that but the XML content is trasformed due to the different character sets between the databases. Some time there are data loss and some time there are data missmatch.
    Is there any way to query the tables stored in the database B without problems? I do not know if the following is correct: Maybe I can set the character set for the session in the database A during the time it query the database B. That is, change the character set in fly at session level.
    Do you have any special suggestion?
    I hope you can help me, thank you in advance.

    The Globalization Support Guide for 11.1.0.7 has a chapter on character set migration that should be helpful. AL32UTF8 is a superset of WE8MSWIN1252 but it is not a strict superset. That is, it doesn't meet the second prong of the test in the documentation
    The new character set is a strict superset of the current character set if:
    Each and every character in the current character set is available in the new character set.
    Each and every character in the current character set has the same code point value in the new character set. For example, many character sets are strict supersets of US7ASCII.Exporting the data from the A, changing the character set (or creating a new database with the AL32UTF8 character set), and then importing the data may be the easiest approach in your case.
    Justin
    Edited by: Justin Cave on Jan 13, 2011 12:08 PM

  • Problem in Import & Export using Database Vault

    I have install oracle 10g Release 10.1.0.3 also i have installed database vault.
    Conn to sqlplus datavault manager
    Create user app1 identfied by app1;
    grant connect to app1;
    Now connect sys as sysdba to sqlplus
    grant resource to app1;
    In short i will give him all athe grants...
    I make a realm of app1 'app1_realm'
    All the authozation is perfomed in realm.
    then i have add it to data dictionary realm as a participent.
    now when i export at table level, it will export the schema with out warnings ie successfully
    but when i export at schema level app1 then it will be exported but with errors.
    the error numbers are
    ora-39083
    ora-31625
    ora-01031
    these errors are raised with grants such as
    grant Unlimited tablespace to app1;
    grant connect to app1;
    grant resource to app1;
    grant exp_full_database to app1;
    grant imp_full_database to app1;
    and with other grants...
    Note that i have granted these grant to user app1
    Please help me
    Best Regards,
    Kiramat Ullah

    I tywill be nice if you post the error messages for the codes
    ora-39083
    ora-31625
    ora-01031
    Not everyone has the time to look them up or know them off head

  • Schema export via Oracle data pump with Database Vault enabled question

    Hi,
    I have installed and configured Database Vault on an Oracle 11g-r2-11.2.0.3 to protect a specific schema (SCHEMA_NAME) via a realm. I have followed the following doc:
    http://www.oracle.com/technetwork/database/security/twp-databasevault-dba-bestpractices-199882.pdf
    to ensure that the sys and the system user has sufficient rights to complete a schedule Oracle data pump export operation.
    I.e. I have granted to sys and system the following:
    execute dvsys.dbms_macadm.authorize_scheduler_user('sys','SCHEMA_NAME');
    execute dvsys.dbms_macadm.authorize_scheduler_user('system','SCHEMA_NAME');
    execute dvsys.dbms_macadm.authorize_datapump_user('sys','SCHEMA_NAME');
    execute dvsys.dbms_macadm.authorize_datapump_user('system','SCHEMA_NAME');
    I have also create a second realm on the same schema (SCHEMA_NAME) to allow sys and system to maintain indexes for real-protected tables, To allow a sys and system to maintain indexes for realm-protected tables. This separate realm was created for all their index types: Index, Index Partition, and Indextype, sys and system have been authorized as OWNER to this realm.
    However, when I try and complete an Oracle Data Pump export operation on the schema, I get two errors directly after the following line displayed in the export log:
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX:
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_MGMT_NOTIFY_QTABLE_S','SYSMAN',1,1,'11.02.00.00.00',newblock)
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 9081
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_TRANSFORM_EXIMP.INSTANCE_INFO_EXP('AQ$_MGMT_LOADER_QTABLE_S','SYSMAN',1,1,'11.02.00.00.00',newblock)
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_TRANSFORM_EXIMP", line 197
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 9081
    The export is completed but with this errors.
    Any help, suggestions, pointers, etc actually anything will be very welcome at this stage.
    Thank you

    Hi Srini,
    Thank you very much for your help. Unfortunately after having followed the instructions of the DOC I am still getting the same errors ?
    none the less thank you for your input.
    I was also wondering if someone could tell me how to move this thread to the Database Security area of the forum, as I feel I may have posted the thread in the wrong place as it appears to be a Database Vault issue and not an imp/exp problem. ?
    Edited by: zooid on May 20, 2012 10:33 PM
    Edited by: zooid on May 20, 2012 10:36 PM

  • Is it possible to query which databases are on a databaseserver

    I am trying to create a list of databases to which a specified user can connect.
    The user has to specify the database server, user name and password and I want to show a list of possible databases.
    Can this be accomplished?
    Thanks.

    Thanks for the help. The code below lists the databases in a MS SQL Server. For MySql I think the trick is to use the query "SHOW DATABASES;" with as column name 'Database', but I don't have a MySql Server here at this moment to test it.
        public static List getDatabases(final Connection dbCon) throws Exception {
            List databases = new ArrayList();
            try {
                String databaseName = null;
                ResultSet rs;
                Statement stat;
                stat = dbCon.createStatement();
                rs = stat.executeQuery("exec sp_databases");
                while (rs.next()) {
                    databaseName = rs.getString("DATABASE_NAME");
                    if (!databases.contains(databaseName)) {
                        databases.add(databaseName);
            } catch (SQLException e) {
                throw new Exception("Get databases failed:" + e.getMessage());
            return databases;
        }

  • Problems with query via Database-Link (Oracle 7.3.4)

    I made the following simple query via database-link.
    select count (*) from [email protected]
    I got the result in about 200 miliseconds.
    Then I4ve tried the following query.
    select * from [email protected]
    It took about 2 hours end ended with an error message "ORA-03113: end-of-file on communication channel"
    So I made another choice
    select * from [email protected] where rownum <=1
    Took about 200 miliseconds.
    So I made the query again an changed only the number of rownums,until I was at rownum <=8
    then it went sleeping again(I've canceled the statement because I didn't want to wait 2 hours again).
    We made the same things from another server with the same database-link on the same remote server
    and we had no problems.
    Any Idea???

    No, network is OK!
    Other links are running, I have also no problems when I connect directly to the remote server.

  • Database Vault version is 10.2.0.3 on DB 10.2.0.4.0

    Hi all
    I installed Oracle 10.2.0.1 and upgraded to 10.2.0.4.0 by using this link
    http://home.c2i.net/toreingolf/how/upgrade_db_10201_10204.htm
    I try to install Oracle Database Vault on windows 32
    OS is Windows 2k3 Edition Service Pack 2
    Databse version is 10G (10.2.0.4.0)
    Database Vault version is 10.2.0.3
    When i try to install the Database Vault i recieved next Error:
    " The Installer has not detected and Oracle 10.2.0.3.0 Enterprise Eddition database in the system, it is required that you must have at least one 10.2.0.3.0 Enterprise Eddition database to install Oracle Database Vault."
    please help me. thanks
    My Y!M nick: chonthanh23
    Best Regards

    Please download and use DBVault 10.2.0.4 for your 10.2.0.4 database:
    http://www.oracle.com/technology/software/products/database_vault/index.html
    Good luck, Peter

  • Explain plans differ:  same query, cloned databases.

    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    Any ideas?
    DB1 (production)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      3    SHAPE.rowid
      4  FROM
      5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      6    b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
      SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    11   12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
      SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    13   14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
    18    HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 254376361
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |
    |*  1 |  HASH JOIN RIGHT OUTER            |                  |   113K|    49M|    17M|  2926   (1)| 00:00:41 |
    |   2 |   TABLE ACCESS FULL               | F15              |   113K|    15M|       |   344   (2)| 00:00:05 |
    |   3 |   VIEW                            |                  |   113K|    34M|       |   331   (2)| 00:00:05 |
    |   4 |    UNION-ALL                      |                  |       |       |       |            |          |
    |*  5 |     HASH JOIN RIGHT ANTI          |                  |   113K|  8948K|       |   332   (2)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |       |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |   8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |       |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |  11 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   113K|  7512K|       |   329   (2)| 00:00:05 |
    |* 12 |     HASH JOIN ANTI                |                  |     1 |   375 |       |     5  (20)| 00:00:01 |
    |  13 |      NESTED LOOPS                 |                  |     1 |   349 |       |     2   (0)| 00:00:01 |
    |  14 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |       |     1   (0)| 00:00:01 |
    |* 15 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |       |     1   (0)| 00:00:01 |
    |* 16 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |* 17 |      VIEW                         | VW_NSO_2         |     1 |    26 |       |     2   (0)| 00:00:01 |
    |  18 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |* 19 |        INDEX FULL SCAN            | D101_PK          |     1 |    39 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
       5 - access("B"."OBJECTID"="$nso_col_1")
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      12 - access("A"."OBJECTID"="$nso_col_1" AND "A"."SDE_STATE_ID"="$nso_col_2")
      15 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      17 - filter("$nso_col_2"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
    47 rows selected.DB2 (staging)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      SHAPE.rowid
    FROM
      3    4    5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      6    7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
    11    SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
    13    SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
      HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    18   19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 4287458713
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   1 |  NESTED LOOPS OUTER               |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   2 |   VIEW                            |                  |   145 | 47125 |   328   (1)| 00:00:05 |
    |   3 |    UNION-ALL                      |                  |       |       |            |          |
    |*  4 |     HASH JOIN ANTI                |                  |   144 | 10224 |   324   (1)| 00:00:05 |
    |   5 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   145 |  8410 |   322   (1)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |*  8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 11 |     FILTER                        |                  |       |       |            |          |
    |  12 |      NESTED LOOPS                 |                  |     1 |   349 |     2   (0)| 00:00:01 |
    |  13 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |     1   (0)| 00:00:01 |
    |* 14 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |     1   (0)| 00:00:01 |
    |* 15 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 16 |      FILTER                       |                  |       |       |            |          |
    |  17 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |* 18 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |* 19 |         INDEX RANGE SCAN          | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |  21 |   TABLE ACCESS BY INDEX ROWID     | F15              |     1 |   145 |     1   (0)| 00:00:01 |
    |* 22 |    INDEX UNIQUE SCAN              | F15_UK1          |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("B"."OBJECTID"="$nso_col_1")
       8 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      11 - filter( NOT EXISTS (SELECT /*+ HASH_AJ */ 0 FROM "AMSOWNER"."D101"
                  "D101","SDE"."STATE_LINEAGES" "L" WHERE :B1>TO_NUMBER(:SYS_B_1) AND
                  "DELETED_AT"="L"."LINEAGE_ID" AND "L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID) AND "SDE_STATE_ID"=:B2 AND
                  "SDE_DELETES_ROW_ID"=:B3 AND "DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID) AND
                  "SDE_STATE_ID">TO_NUMBER(:SYS_B_1)))
      14 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      15 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - filter(:B1>TO_NUMBER(:SYS_B_1))
      18 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_DELETES_ROW_ID"=:B1 AND "SDE_STATE_ID"=:B2)
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      22 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
    58 rows selected.

    rocr wrote:
    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    DB1 (production)
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |DB2 (staging)
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    If you check the execution plans it's quite obvious that the two environments can not be identical. If you have the same (amount of) data, then one of the two estimates is way off. Which one is in the right ballpark, how many rows are returned by the query? The same applies to the remaining operation ids of the plan, which estimate is correct?
    It's very likely that the underlying table/index statistics are not the same, and therefore you get different plans.
    By the way, you're using bind variables, therefore the output of the EXPLAIN PLAN is only of limited use, since the actual plan at run time might be completely different due to bind variable peeking and potentially histograms created on some of the columns (which is the default in 10g due to the "FOR ALL COLUMNS SIZE AUTO" method_opt default parameter value).
    If you haven't disabled the pre-configured statistics collection job that runs every night in 10g, you might get different statistics due to this job already.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

Maybe you are looking for