partion tables and indexes

Hi all

DB: 10.2.0.4

Is that we can convert a normal table into partitioned tables?
If Yes, then what is the existing indexes on this table?

IM totally new about partitioning (Table and Index). I read the oracle docs but still have confusion with local and global index (score and no-partion)...


Please suggest...

Kind regards.

>
Is that we can convert a normal table into partitioned tables?
If Yes, then what is the existing indexes on this table?
>
You can use the EXCHANGE PARTITION to do. See this article from the Oracle base
Partitioning of an existing Table using the EXCHANGE PARTITION
http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table-using-Exchange-partition.php

Or you can use for DBMS_REDEFINITION do directly

See this article from the Oracle base
http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table.php

You can also create a new table and INSERT the data from the old table.

The option you are using could depend on indexes how you have, if you intend to keep them all and if the indexes on the partitioned table must be either local or global.

To refine the new partitioned table, you really need evaluate each index to determine that the index should be global or local, and if the index should also be partitioned.

There isn't any point to create a new table with the same indexes if you want to redefine all the indexes. You would be better of the backup of the original and then table drop indexes before conversion.

See the VLDB and partitioning Guide
http://docs.Oracle.com/CD/B28359_01/server.111/b32024/TOC.htm

Tags: Database

Similar Questions

  • Partitioned Tables and indexes

    Hello


    I have a question on the table and index partitioning. My scenario is:

    Charge 2 mio records in table T once a month. Loaded records are added to existing records, and once loaded data is never changed.
    At some point, I want to delete the older recordings, so I intend to this partition table.

    T table looks like:
    create table t (id       number(10) not null  constraint t_pk primary key,
                    period   number(10) not null,
                    contract number(10) not null,
                    attr     number(10) not null);
    
    create unique index t_ux1 on t(contract,period);
    
    create index t_ix2 on t(period);
    My plan is to partition T over the period, and I'm trying to read through the concepts
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/partconc.htm#g471747


    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »


    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    If true, what will happen when a partion fell?


    I am new in this area, so please feel the comment as you wish.


    Concerning
    Peter


    BANNER
    ----------------------------------------------------------------
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64bi
    PL/SQL version 10.2.0.3.0 - Production
    CORE Production 10.2.0.3.0
    AMT for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - production
    NLSRTL Version 10.2.0.3.0 - Production

    Peter Gjelstrup wrote:

    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »

    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    A partitioned index locally can only be defined as unique if the partition key is part of the columns in the index. Imagine what the database would have to do if this is not the case: in order to verify if a newly added or updated value violates the uniqueness, it will have to travel all the partitions in a serialized operation - means that no one else could do the same thing at the same time. Since he is a killer of serious scalability in terms of locking and contention, this is not allowed.

    So: Your T_UX1 index can be defined as a unique index that is local because it contains the partition key. Although the index is not prefixed ("Prefix" means that it is divided by the left side of the columns in the index) which means that there may be access patterns where all partitions should be scanned or the optimizer cannot use a method of size of effective partition according to the way the index is reached.

    Your T_PK index cannot be set as local because it must be unique (you can not use a local non-unique index in this case), but does not contain your partition key. It must be a global index. An overall index can be partitioned as well (different from the underlying table) but it doesn't have to be.

    Depends on how you access your data you have not T_IX2 index when partitioning by this key because it corresponds to the partition key and therefore could not actually be used by the mechanism of partition pruning that limit your query to the scores of individuals.

    If you have more than one MAS environment where running queries are used longer, you should be fine with the index the in general (because they could be analyzed in parallel in parallel operations), but if you have an OLTP environment, then you should avoid local no prefix indexes due to the potential problem that you need to analyze all partitions.

    Be borne in mind that with partitioning adds an important layer of complexity to other areas: in particular the options available to the optimizer and analyze cost optimizer statistics. Depends on how you access your statistical data must be maintained on several levels now (level of score and at the global level, in the case of subpartitioning may be still at this level). If your data is important and you rely on "global" level statistics (these are always the case when the optimizer at the time analysis cannot limit access to a single partition) then in the pre - 11 g databases analyze these "global" level statistics can take a lot of time and resources, since actually , you need data several times (once for the partition and even global level).

    Presenting this partitioning may mean other potential problems in terms of execution that change (not for the better sometimes) plans and how to effectively collect statistics. Note that g 11 addresses the issue of 'statistics' by introducing the so-called "extra" global statistics. Greg Rahn wrote a [blog note | http://structureddata.org/2008/07/16/oracle-11g-incremental-global-statistics-on-partitioned-tables/] on this nice feature.

    >

    If true, what will happen when a partion fell?

    Since you're already on 10g, you can specify the database to update the scores of the local index using the UPDATE of the INDEX clause, while 9i could maintain only an overall index and it is up to you to rebuild the local index partitions after the partition DDL on the table (according to the DDL operation).

    Kind regards
    Randolf

    Oracle related blog stuff:
    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/

    Published by: Randolf Geist on Sep 30, 2008 16:39

    Added statistics / optimizer warning when you use the partitioning

  • New tables and indexes created do not appear in the view dba_segments

    Hi all

    I created 3 tables and indexes, but these items do not appear in dba_segments views. Is this a normal behavior? Previously, with dictionary managed tablespace, I can specify the least possible to create, at the table/index is created. But I don't know how works the locally managed tablespace. Please do advice. Thank you much in advance.

    I am using Oracle 11 g R2 (11.2.0.1.0) for Microsoft Windows (x 64), running on Windows 7.

    To reproduce this problem, I created the tablespaces as follows:

    CREATE TABLESPACE CUST_DATA
    DATAFILE ' d:\app\asus\oradata\orcl11gr2\CUST_DATA01. DBF' SIZE 512K
    AUTOEXTEND ON NEXT MAXSIZE 2000 K 256K
    MANAGEMENT UNIFORM LOCAL 256K SIZE MEASURE
    SEGMENT SPACE MANAGEMENT AUTO;

    CREATE TABLESPACE CUST_INDX
    DATAFILE ' d:\app\asus\oradata\orcl11gr2\CUST_INDX. DBF' SIZE 256K
    AUTOEXTEND ON NEXT MAXSIZE 2000 K 128K
    MANAGEMENT UNIFORM LOCAL 128K SIZE MEASURE
    SEGMENT SPACE MANAGEMENT AUTO;

    CREATE TABLE CUSTOMER_MASTER (CUST_ID VARCHAR2 (10))
    CUST_NAME VARCHAR2 (30),
    E-MAIL VARCHAR2 (30),
    DATE OF BIRTH,
    ADD_TYPE CHAR (2) CONSTRAINT CK_ADD_TYPE CHECK (ADD_TYPE ("B1", "B2", "H1", "H2")),
    CRE_USER VARCHAR2 (5) DEFAULT USER,.
    CRE_TIME TIMESTAMP (3) DEFAULT SYSTIMESTAMP.
    MOD_USER VARCHAR2 (5).
    MOD_TIME TIMESTAMP (3),
    CONSTRAINT PK_CUSTOMER_MASTER PRIMARY KEY (CUST_ID) USING INDEX TABLESPACE CUST_INDX)
    TABLESPACE CUST_DATA;

    SQL > SELECT TABLE_NAME, nom_tablespace
    USER_TABLES 2
    3 WHERE TABLE_NAME LIKE '% CUST. "

    TABLE_NAME, TABLESPACE_NAME
    ------------------------------ ------------------------------
    CUSTOMER_MASTER CUST_DATA

    SQL > SELECT INDEX_NAME, nom_tablespace
    2 FROM USER_INDEXES
    3 WHERE TABLE_NAME LIKE '% CUST. "

    INDEX_NAME TABLESPACE_NAME
    ------------------------------ ------------------------------
    PK_CUSTOMER_MASTER CUST_INDX


    SQL > SELECT nom_segment, SEGMENT_TYPE, nom_tablespace, BYTES
    2 FROM WHERE USER_SEGMENTS;

    no selected line

    An extension to what Sybrand said:

    There is a parameter called differed_segment_creation, who runs the behavior.

    If it is set to TRUE (the default), no segments will be allocated until you fill your table / index.

    Try to insert a row. You will see your table and index in dba_segments.

    See for more information

    http://docs.Oracle.com/CD/E14072_01/server.112/e10595/tables002.htm

  • How FLASHBACK all TABLEs and indexes in a certain pattern for a restoration of p?

    Today I read a few web pages on how to use FLASHBACK to restore to a Restore Point.

    Unfortunately, all of these examples show just how to restore a single TABLE for example

    FLASHBACK TABLE t to RESTORE POINT before_we_do_anything;

    But how can I FLASHBACK all TABLEs (and indexes and other dependent objects) in a certain pattern to a one-step restore point)?

    FLASHBACK myschema.* to before_we_do_anything POINT of RESTORATION;

    does not work.

    Peter

    There is nothing like that. However, you could flashback the entire database to a point in time. It would of course have implications through patterns all the good.

    Nicolas.

  • After spending tables and index a different tablespace, index got unusable?

    Hello

    I moved to table and index a different tablespace. After the many indices obtained unusable. I did not understand thiis?

    How can I do still usable?

    best regards and thank you?

    If you bâtait the index (after moving the table, by the way), then they should be usable without something extra to see.
    Check this procedure only one (small) table and index if this index can be used later. If not, then you have a mystery :-)

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • How to collect statistics of Tables and index

    Hi all

    Please help me in the collection of statistics of Tables and index.

    Thank you

    for tables
    exec dbms_stats.gather_table_stats ("SCOTT", "EMPLOYEES");

    for indexes
    DBMS_STATS.gather_index_stats exec ('SCOTT', 'EMPLOYEES_PK');

    Visit this link for details
    http://nimishgarg.blogspot.com/2010/04/Oracle-dbmsstats-gather-statistics-of.html

  • I'm looking for Custom table and index

    Hi Hussein;
    I want to find tables and indexes in the APPS schema. All custom tables and index begins with ZZ...

    I try to type this query, but its bring many record a lot, where I am not mistaken. And can not find the query for custom index.

    Select a.table_name, a.owner, d.CREATED
    from all_tables an inner join dba_objects d on
    a.OWNER = d.OWNER
    where table_name like '% ZZ' and 'a.OWNER =' APPS

    Thanks for the tips

    Hello

    You do not have to join, ask just DBA_OBJECTS (where type_objet = 'TABLE' and object_name like '% ZZ') or (where object_type = 'TABLE' and OWNER = "CUSTOM SCHEMA"). If you follow the standards of customization, custom tables/index should exist under the custom schema (and not under APPS schema).

    Kind regards
    Hussein

  • The cache/pin layout tables and indexes - Howto?

    Hi all

    I touched upon a request by a seller of BEDS to do something I'm not terribly familiar with... they want to "hide" or "pin" a table and an index in memory.

    I was looking and saw something to the effect of making the Table1

    ALTER TABLE Table1 in CACHE;

    However, the seller has been mention some examples that seem to indicate the creation of a pool of Dungeon (a pool of buffers separate cache?).. and then doing something like

    ALTER TABLE Table1 STORAGE (USER_TABLES KEEP)

    Can someone give me an idea as to the difference between these two concepts... links on how do, etc.?

    Thanks in advance!

    Cayenne

    Hello

    There are 'rules' to pin the tables and indexes. The Oracle documentation states:

    "A good candidate for a segment in the pool of the DUNGEON is a segment that is smaller than 10% of the size of the DEFAULT buffer pool and has suffered at least 1% of the total i/o in the system."

    Here are the rules that I use:

    -Cache tables & indexes where the table is low)<50 blocks)="" and="" the="" table="" experiences="" frequent="" full-table="">

    -Cache objects that use more than 10% of the size of the data buffer.

    Here is the script I use to automate the assignment of the tables in the pool of DUNGEON.

    ATTENTION: This script is not for beginners:

    http://www.rampant-books.com/t_oracle_keep_pool_assignment.htm

    I hope this helps...

    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: the definitive reference".
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • DBMS_STATS Table and Index Stats Question?

    All,

    Oracle database version: 10.2.0.3
    Operating system: Solaris 10 X 86-64

    We have a packed application we collect stats of objects with cascade = "TRUE". If the index statistics would be also collected in the process of collecting statistics. We do a estimate_percent = > 30 and method_opt = > all COLUMNS size AUTO no statistical calculation of these paintings that are huge (1 m lines - 192 m). The collected index statistics is based also on the estimate_percent product in the order.

    We found that some of the SQL had improved performance after the calculation of the index statistics in our Test environment that is a copy of production, updated daily.

    We thought the way to collect statistics:

    Collect statistics for tables with estimate_percent and Computing stats on index.

    We are making changes to our scripts and test approach in our Test environment.

    In the meantime, I would like to know the pros and cons of this approach?


    Thank you
    Anantha

    You run your own collect routine of stats, I understand that you disable an Oracle provides and plans automatically on 10g?

    What result did you get the Oracle supplied with AUTO_SAMPLE_SIZE routine?

    Estimate of the table and then calculating the index was something that I saw recommended in the past with ANALYZE and if you see the best results to the test, I think it would be worth in production.

    None of the environments applications two users are exactly the same, but the approach appears reasonable based on your observations.

    I suggest to bring together some before and after snapshots of query performance so that you have documentation of your results.

    IMHO - Mark D Powell-

  • INI_TRANS for TABLE and INDEX

    Hello

    My version of DB is 10.2.0.3

    As default, the INI_TRANS of the tables is 1 and for the index is 2. For some reason I have to increase the INI_TRANS of a table at 5, then what value set for INI_TRANS of indexes on the table?

    I read somewhere that INI_TRANS of the index to be set twice from INI_TRANS. means of the table if table INI_TRANS is 5 then INI_TRANS of the index must be set to 10. Is this true? If Yes, then what is the logic behind this?



    Thank you
    Oratest

    Published by: oratest on February 4, 2013 15:26

    oratest wrote:

    My version of DB is 10.2.0.3

    As default, the INI_TRANS of the tables is 1 and for the index is 2. For some reason I have to increase the INI_TRANS of a table at 5, then what value set for INI_TRANS of indexes on the table?

    I read somewhere that INI_TRANS of the index to be set twice from INI_TRANS. means of the table if table INI_TRANS is 5 then INI_TRANS of the index must be set to 10. Is this true?

    N °
    There is no useful guidelines for a generic parameter. Consider the conflicting scenes:

    (a) five sessions insert five rows separated in a single table block - with 5 locations of ITL. There is an index on the table, but the five inserted rows just keep these different values that their index entries go to 5 different leaf blocks: the index didn't need initrans 5.

    (b) using the different sessions to insert a row in a table - the nature of the SAMS means that (on average) there are 5 rows of SAMS 80 inserted into 16 different blocks - the SAMS table must be 5. However, in this case the indexed column is generated by a sequence and all 80 index entries should be inserted in the same block of sheets, so you initrans 80 on the index. (Except Oracle will make sheets index block split to work around the problems of initrans was too small on the concurrent inserts.)

    You need to consider the nature of the index and model of changing data for each unique index separately - and then you could assign initrans on the index to do NO MORE THAN the initrans + 1 table because (a) who will lose not too much space (b) he is not likely to let the too great claim to happen (c) Oracle will extend dynamically LAUGHED in most cases (d) if it is bad for an index special you will notice it pretty quickly - and there will be other problems (buffer waits occupied) deal anyway on this index.

    Concerning
    Jonathan Lewis

  • can we find unused tables and markings using OEM 12 c

    Hello

    I use OEM 12 c, databases are all about 11.2.0.3 and need to find if I can find many empty tables and markings unused acorss our env using OEM 12 c
    DBA create tables and indexes intended to test dummy and then they forget to delete these objects that are not been used for a long time.
    can I use a time regarding since when they are not being used and if they are empty using OEM 12 c.

    Thank you

    Don't know if EM can be used for this but you can use the audit to see if tables/indexes are used. See http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_4007.htm#i2116021

    Just to know if indexes are used, you can use ALTER INDEX USE of SURVEILLANCE;
    For more information, see http://www.oracle-base.com/articles/10g/index-monitoring.php

    Eric

  • Creating a unique index frame on a one-to-many table and search

    Hello

    I was properly put in place of the full text index on multiple columns on the same table (using the MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a table of one-to-many data collection (with a CF of a lookup table), and I need to get columns through two of these tables. Code example below, several of my chatter after the code block:
    CREATE TABLE SUBMISSION
    ( SUBMISSION_ID             NUMBER(10)          NOT NULL,
      SUBMISSION_NAME           VARCHAR2(100)       NOT NULL
    );
     
    CREATE TABLE ADVISOR_TYPE
    ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_NAME         VARCHAR2(50)        NOT NULL
    );
      
    CREATE TABLE SUBMISSION_ADVISORS
    ( SUBMISSION_ADVISORS_ID    NUMBER(10)          NOT NULL,
      SUBMISSION_ID             NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      FIRST_NAME                VARCHAR(50)         NULL,
      LAST_NAME                 VARCHAR(50)         NULL,
      SUFFIX                    VARCHAR(20)         NULL
    );
    
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March');
    
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist');
    
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL);
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS');
     
    COMMIT;
    I want to be able to create a text index to group these fields:

    SUBMISSION_ADVISORS. FIRST NAME
    SUBMISSION_ADVISORS. LAST_NAME
    SUBMISSION_ADVISORS. SUFFIX
    ADVISOR_TYPE. ADVISOR_TYPE_NAME

    I looked at DETAIL_DATASTORE and USER_DATASTORE, but examples of Oracle Docs for DETAIL_DATASTORE leave me a little confused. It seems that this should be fairly simple.

    Ideally, I try to avoid creating new columns and keeping a minimum shutter adjustments. But I'm open to any suggestion. Thanks for your time and your thoughts.

    -Jamie

    I would create a procedure that creates a virtual with labels document, what is the multi_column_datatstore behind the scenes. Then I would like to use this procedure in a user_datastore, so the result is the same for several tables as a multi_column_datastore for a table. I would use auto_section_group or another type of Group of sections, so that you can search from WITHIN as with the multi_column_datastore. Please see the demo below.

    SCOTT@orcl_11gR2> -- tables and data that you provided:
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION
      2  ( SUBMISSION_ID           NUMBER(10)          NOT NULL,
      3    SUBMISSION_NAME           VARCHAR2(100)          NOT NULL
      4  )
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE
      2  ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      3    ADVISOR_TYPE_NAME      VARCHAR2(50)          NOT NULL
      4  )
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS
      2  ( SUBMISSION_ADVISORS_ID      NUMBER(10)          NOT NULL,
      3    SUBMISSION_ID           NUMBER(10)          NOT NULL,
      4    ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      5    FIRST_NAME           VARCHAR(50)          NULL,
      6    LAST_NAME           VARCHAR(50)          NULL,
      7    SUFFIX                VARCHAR(20)          NULL
      8  )
      9  /
    
    Table created.
    
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      3    VALUES (1, 'Some Research Paper')
      4  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      5    VALUES (2, 'Thesis on 17th Century Weather Patterns')
      6  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      7    VALUES (3, 'Statistical Analysis on Sunny Days in March')
      8  SELECT * FROM DUAL
      9  /
    
    3 rows created.
    
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      3    VALUES (1, 'Department Chair')
      4  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      5    VALUES (2, 'Department Co-Chair')
      6  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      7    VALUES (3, 'Professor')
      8  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      9    VALUES (4, 'Associate Professor')
     10  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
     11    VALUES (5, 'Scientist')
     12  SELECT * FROM DUAL
     13  /
    
    5 rows created.
    
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      3    VALUES (1,1,2,'John', 'Doe', 'PhD')
      4  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      5    VALUES (2,1,2,'Jane', 'Doe', 'PhD')
      6  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      7    VALUES (3,2,3,'Johan', 'Smith', NULL)
      8  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      9    VALUES (4,2,4,'Magnus', 'Jackson', 'MS')
     10  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
     11    VALUES (5,3,5,'Williard', 'Forsberg', 'AMS')
     12  SELECT * FROM DUAL
     13  /
    
    5 rows created.
    
    SCOTT@orcl_11gR2> -- constraints presumed based on your description:
    SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk
      2    PRIMARY KEY (submission_id)
      3  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk
      2    PRIMARY KEY (advisor_type_id)
      3  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk
      2    PRIMARY KEY (submission_advisors_id)
      3  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk
      2    FOREIGN KEY (submission_id) REFERENCES submission (submission_id)
      3  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk
      2    FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id)
      3  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> -- resulting data:
    SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45
    SCOTT@orcl_11gR2> COLUMN advisor      FORMAT A40
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  sa.advisor_type_id = a.advisor_type_id
     10  AND    sa.submission_id = s.submission_id
     11  /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    Statistical Analysis on Sunny Days in March   Scientist Williard Forsberg AMS
    
    5 rows selected.
    
    SCOTT@orcl_11gR2> -- procedure to create virtual documents:
    SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc
      2    (p_rowid IN           ROWID,
      3       p_clob     IN OUT NOCOPY CLOB)
      4  AS
      5  BEGIN
      6    FOR r1 IN
      7        (SELECT *
      8         FROM      submission_advisors
      9         WHERE  ROWID = p_rowid)
     10    LOOP
     11        IF r1.first_name IS NOT NULL THEN
     12          DBMS_LOB.WRITEAPPEND (p_clob, 12, '');
     13          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name);
     14          DBMS_LOB.WRITEAPPEND (p_clob, 13, '');
     15        END IF;
     16        IF r1.last_name IS NOT NULL THEN
     17          DBMS_LOB.WRITEAPPEND (p_clob, 11, '');
     18          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name);
     19          DBMS_LOB.WRITEAPPEND (p_clob, 12, '');
     20        END IF;
     21        IF r1.suffix IS NOT NULL THEN
     22          DBMS_LOB.WRITEAPPEND (p_clob, 8, '');
     23          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix);
     24          DBMS_LOB.WRITEAPPEND (p_clob, 9, '');
     25        END IF;
     26        FOR r2 IN
     27          (SELECT *
     28           FROM   submission
     29           WHERE  submission_id = r1.submission_id)
     30        LOOP
     31          DBMS_LOB.WRITEAPPEND (p_clob, 17, '');
     32          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name);
     33          DBMS_LOB.WRITEAPPEND (p_clob, 18, '');
     34        END LOOP;
     35        FOR r3 IN
     36          (SELECT *
     37           FROM   advisor_type
     38           WHERE  advisor_type_id = r1.advisor_type_id)
     39        LOOP
     40          DBMS_LOB.WRITEAPPEND (p_clob, 19, '');
     41          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name);
     42          DBMS_LOB.WRITEAPPEND (p_clob, 20, '');
     43        END LOOP;
     44    END LOOP;
     45  END submission_advisors_proc;
     46  /
    
    Procedure created.
    
    SCOTT@orcl_11gR2> SHOW ERRORS
    No errors.
    SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates:
    SCOTT@orcl_11gR2> DECLARE
      2    v_clob  CLOB := EMPTY_CLOB();
      3  BEGIN
      4    FOR r IN
      5        (SELECT ROWID rid FROM submission_advisors)
      6    LOOP
      7        DBMS_LOB.CREATETEMPORARY (v_clob, TRUE);
      8        submission_advisors_proc (r.rid, v_clob);
      9        DBMS_OUTPUT.PUT_LINE (v_clob);
     10        DBMS_LOB.FREETEMPORARY (v_clob);
     11    END LOOP;
     12  END;
     13  /
    JohnDoePhDSome
    Research PaperDepartment Co-Chair
    JaneDoePhDSome
    Research PaperDepartment Co-Chair
    JohanSmithThesis on 17th Century
    Weather PatternsProfessor
    MagnusJacksonMSThe
    sis on 17th Century Weather PatternsAssociate
    Professor
    WilliardForsbergAMS
    

    Statistical Analysis on Sunny Days in

    MarchScientist
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- user_datastore that uses procedure:
    SCOTT@orcl_11gR2> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc');
      4  END;
      5  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group:
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1))
      2  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx
      2  ON submission_advisors (any_column)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS
      5    ('DATASTORE     sa_datastore
      6        SECTION GROUP     CTXSYS.AUTO_SECTION_GROUP')
      7  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i
      2  /
    
    TOKEN_TEXT
    ----------------------------------------------------------------
    17TH
    ADVISOR_TYPE_NAME
    AMS
    ANALYSIS
    ASSOCIATE
    CENTURY
    CHAIR
    CO
    DAYS
    DEPARTMENT
    DOE
    FIRST_NAME
    FORSBERG
    JACKSON
    JANE
    JOHAN
    JOHN
    LAST_NAME
    MAGNUS
    MARCH
    PAPER
    PATTERNS
    PHD
    PROFESSOR
    RESEARCH
    SCIENTIST
    SMITH
    STATISTICAL
    SUBMISSION_NAME
    SUFFIX
    SUNNY
    THESIS
    WEATHER
    WILLIARD
    
    34 rows selected.
    
    SCOTT@orcl_11gR2> -- sample searches across all data:
    SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
    SCOTT@orcl_11gR2> EXEC :search_string := 'professor'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string) > 0
     10  AND    sa.advisor_type_id = a.advisor_type_id
     11  AND    sa.submission_id = s.submission_id
     12  /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    
    2 rows selected.
    
    SCOTT@orcl_11gR2> EXEC :search_string := 'doe'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    
    2 rows selected.
    
    SCOTT@orcl_11gR2> EXEC :search_string := 'paper'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    
    2 rows selected.
    
    SCOTT@orcl_11gR2> -- sample searches within specific columns:
    SCOTT@orcl_11gR2> EXEC :search_string := 'chair'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0
     10  AND    sa.advisor_type_id = a.advisor_type_id
     11  AND    sa.submission_id = s.submission_id
     12  /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    
    2 rows selected.
    
    SCOTT@orcl_11gR2> EXEC :search_string := 'phd'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0
     10  AND    sa.advisor_type_id = a.advisor_type_id
     11  AND    sa.submission_id = s.submission_id
     12  /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    
    2 rows selected.
    
    SCOTT@orcl_11gR2> EXEC :search_string := 'weather'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0
     10  AND    sa.advisor_type_id = a.advisor_type_id
     11  AND    sa.submission_id = s.submission_id
     12  /
    
    SUBMISSION_NAME                               ADVISOR
    --------------------------------------------- ----------------------------------------
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    
    2 rows selected.
    
  • Table of contents and indexes appears in live Webhelp

    I work in a HR 10 draft updated from RH 9 project. During the generation of Webhelp, local output displays fine, but once compiled and download our online application, the table of contents and Index are not displayed - what I mean is that the tabs exist, you can click on them, but they are empty. Research works, as well as the header logo does not appear, although it is in the images folder that is downloaded.

    More details:

    • I view the project in an external file in the root folder of the project. To clarify, the project is in a folder named "Help", and the output is in a separate folder named '9.1 help' to the same level of the help file. When I provided the output, I only provide the folder «9.1 help» Could it be the cause of the problem?
    • After reviewing similar issues, I find that the HCC project file does not exist in my .hhk file, nor the .glo, exit, etc. I suspect that this could be the problem. However, insofar as I understand it, it is not possible for the final .htm file for the project in the same folder that contains these output files. You must publish in a different output outside the root path folder.
    • I tried to change the default table of contents and the Index under Webhelp settings > Categories > content of default in the table of contents specific to my project (this is the only table of contents and Index, so it shouldn't cause mistaked, but I don't know if this change means something).

    I would be happy to provide any other details if necessary.

    Thank you!

    Hello

    Just a parenthesis. The mark of the Web option will only apply when view you the contents of your local hard disk and that you use Microsoft Internet Explorer as browser. If you download this content to a server, the option may as well not exist. So it won't matter if it is enabled or not and would have no impact on this situation.

    Change the option of DHTML shouldn't really affect it either.

    @Colum - package_xx.html files are certainly part of the production of RoboHelp. After you generate WebHelp, you should see them in the whxdata folder.

    I think we've established that files display fine immediately after generating it, no? So, which suggests that the issue is entirely in the hands of perforce and that the development team. (or, more accurately, NOT to do)

    See you soon... Rick

  • Easy to change the owner of the TABLE (and according to indexes and views) available?

    I want to change the Owver from a TABLE (and the owner of all VIEWS and INDEXES in function).
    The only way that I know so far is something like

    CREATE TABLE < newschema >. < table_name > select * from < oldschema >. < tablename >;

    Then, slide old TABLE
    Recreate it possible all the CLUES and the views.

    It is kind of bulky.
    Especially when I don't know what indexes exist for a certain TABLE.
    When I investigate this and I have found 4 indexes so much work needs to be done.

    Is there a shorter, smarter way to accomplish the task.
    I prefer a SINGLE task of all-for-statement

    :-)

    Thank you
    Peter

    Hello
    export of diagram a (exp or expdp)
    import in diagram B (imp or impdp)

  • Check a functional index on a table and its metadata

    Hello

    I have a functional base normal index (unique) defined on a table that uses a function of decoding and a combination of the columns of a table.
    For example: decode (status, 'A', column1 | column 2, column1 | Column2 | Column3)

    Now my question is, how do we ask these functional indices of the database to see what exactly is the function...

    On the database when I run a query: -.

    Select in all_indexes where index-name =: index_name, *.

    She retrieves the name of the stored index code as ncs $00025 (don't remember the exact value).

    How will I know what exactly is the function? (from table)

    and is it possible that I can query the data that has been indexed by this unique index, so that I can check why unique constraint is violated in some cases?

    Thank you and best regards,
    Sylvain

    How, we ask these functional indices of the database to see what exactly is the function...

     select * from user_ind_expressions
    

Maybe you are looking for