Creating index LOB after move comand

Hello

I'm done move the tables to a different tablespace. I also rebuild the index. I just wanted to ask if re-create a lobsegment the same thing with the other indices. What other command and more.
ALTER index rebuild tablespace ts_new _name index. »

Thank you

>
. We have a database of test and the pattern is CHEVY. CHEVY has a table named STOR1 with lob on the tablespace TS1 table column. I want to do is move the table to another TS Let's say TS1 >

You want to move the tables in the tablespace even or an another tablespace as by what you wrote both the name of tablespaces are the same "TS1 *.» But I suppose you want to move to a different tablespace. So I gave the a name * TS2 *, to the other tablespace.

Now, when the fire the command below

SQL > ALTER TABLE STOR1 MOVE TABLESPACE TS2;

This command will move the table to new table space but won't move the CLOB segment and it will always be in the original tablespace. This is because the LOB data is stored outside the table.

Now, to control the storage space of the CLOB column by issuing the following sql:

SELECT index_name, nom_tablespace FROM user_indexes WHERE table_name = 'STOR1 '.

To move different tablespace CLOB column, we issue after a command.

SQL > ALTER TABLE STOR1 MOVE LOB (TEST_NAME) STORE DID (TABLESPACE TS2);

In above example, TEST_NAME is the column CLOB we want to spend again tablespace and tablespace TS2 target. Above command will pass successfully the LOB segments to the new tablespace. We can verify this by launching sql even once again.

SQL > SELECT index_name, nom_tablespace FROM user_indexes WHERE table_name = 'STOR1 ';

HTH
Anand

Tags: Database

Similar Questions

  • ORA-02327: cannot create indexes on the LOB data type expression

    DB 10.2.0.4
    DB 5.2

    I am not able to move lobindex and lobsegment. While try occurs below error

    SQL > ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD THE TABLESPACE DATA_TEMP;
    ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD TABLESPACE DATA_TEMP
    *
    ERROR on line 1:
    ORA-02327: cannot create indexes on the LOB data type expression

    Thank you

    Published by: user13382934 on October 16, 2012 14:05

    correct syntax is
    ALTER TABLE.

    MOVE the LOB ()
    STORE AS (tablespace );

    Where is a name of the / columns LOB, not the name of the segment. Moving type LOB data will move its indexes as well.

  • Analyze tables after creating indexes

    Hi all

    I created new clues on the production environment, we must analyze tables after creating indexes. Why and what analysis do?

    Thanks for the help.
    Select * from V$version;
    
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    There are so many different options and you'll certainly want to tweak your stats based on your system.
    The best thing to do is to read about dbms_stats:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14211/stats.htm#PFGRF30102
    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_stats.htm#CIHEHDFB

    Here are a few examples to give you an idea of what they look like and how to perform:

    BEGIN
      DBMS_STATS.GATHER_TABLE_STATS(OWNNAME          => 'schema_name',
                                    TABNAME          => 'table_name',
                                    ESTIMATE_PERCENT => DBMS_STATS.AUTO_SAMPLE_SIZE, --> For really big tables oracle can just do a specific percent
                                    METHOD_OPT       => 'for all columns size 1', --> Defines Histograms, size one disables histograms
                                    DEGREE           => 12, --> The degree of parallelism so you'll see 12 parallel threads gathering stats
                                    CASCADE          => TRUE); --> gather stats on the table's indexes also
    END; 
    
    BEGIN
      DBMS_STATS.GATHER_INDEX_STATS(OWNNAME          => 'schema_name',
                                    INDNAME          => 'index_name',
                                    ESTIMATE_PERCENT => 50,
                                    DEGREE           => 4);
    END; 
    

    You can also do

    DBMS_STATS.gather_schema_stats
    DBMS_STATS.gather_database_stats

    and much more...

    I really want to focus on the need to do your homework on them,
    read the docs I linked and adjust your statistical parameters to fit your db objects and how they are accessed/used.
    Having accurate and meaningful statistics are very important to the performance of the database.

  • Creating INDEX on a BLOB column in a separate tablespace

    Hello


    Our database contains 2 storage spaces :

    -Tablespace DATA : is reserved to hold the data.

    -Tablespace INDX: is reserved to hold the index.


    For some reason, that we must create the indexes on columns of type blob and the pending order are:

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT;  / / doc_content a blob type.

    SQL> index created

    Now, all indexes are created in the tablespace for DATA that is not good, they should be created in the tablespace INDX (now is empty)

    For this reason, and after a search, I specified the tablespace INDX , which will contain the index, and the used command is:

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT TABLESPACE INDX;

    *

    ERROR on line 1:

    ORA-29850: invalid option for creating domain index

    NB: also, when I try to use the same command with varchar column, it works.

    SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_name) TABLESPACE INDX;  / / doc_content a type VARCHAR2.

    SQL> index created


    Do you have an idea on how to create indexes on a blob column in a different tablespace?

    This question has nothing to do with the Oracle objects, but is related to Oracle Text, then perhaps that some moderator moves text objects.

    To specify a storage space for a ctxsys.context Oracle Text index domain index tables, you must create a storage preference, specify storage spaces in attributes of this preference, then use this preference in settings of creating index.  Please see the example below which shows first create domain index tables in the default users tablespace, then the creation of the field tables to be indexed in the example tablespace.

    Scott@orcl_11gR2 >-test environment:

    Scott@orcl_11gR2 > doc_contents CREATE TABLE

    2 (doc_content BLOB)

    3.

    Table created.

    Scott@orcl_11gR2 > INSERT INTO doc_contents VALUES

    2 (UTL_RAW. CAST_TO_RAW ("test data"))

    3.

    1 line of creation.

    Scott@orcl_11gR2 >-create domain index tables in default users tablespace:

    Scott@orcl_11gR2 > my_index CREATE INDEX

    2 doc_contents (doc_content)

    3 INDEXTYPE IS CTXSYS. FRAMEWORK

    4.

    The index is created.

    Scott@orcl_11gR2 > SELECT index_name, nom_tablespace

    2 FROM user_indexes

    3. WHERE index-name LIKE '% MY_INDEX % '.

    4.

    INDEX_NAME TABLESPACE_NAME

    ------------------------------ ------------------------------

    MY_INDEX

    DR.$ MY_INDEX$ X USERS

    2 selected lines.

    Scott@orcl_11gR2 > SELECT table_name, nom_tablespace

    2 FROM user_tables

    3 WHERE table_name LIKE '% MY_INDEX % '.

    4.

    TABLE_NAME, TABLESPACE_NAME

    ------------------------------ ------------------------------

    DR. MY_INDEX$ I HAVE USERS

    USERS R DR$ MY_INDEX$

    DR.$ MY_INDEX$ N

    DR.$ MY_INDEX$ K

    4 selected lines.

    Scott@orcl_11gR2 >-creating the tables index field in example of tablespace:

    Scott@orcl_11gR2 > my_index DROP INDEX

    2.

    The index is deleted.

    Scott@orcl_11gR2 > start

    2 ctx_ddl.create_preference ("mystore', 'BASIC_STORAGE'");

    3 ctx_ddl.set_attribute ("mystore', 'I_TABLE_CLAUSE',")

    4 "tablespace storage example (original 1 K) ');

    5 ctx_ddl.set_attribute ("mystore', 'K_TABLE_CLAUSE',")

    6 "tablespace storage example (original 1 K) ');

    7 ctx_ddl.set_attribute ("mystore', 'R_TABLE_CLAUSE',")

    8 ' lob tablespace storage example (original 1 K)

    9 (data) store as (storage off in row cache)');

    10 ctx_ddl.set_attribute ("mystore', 'N_TABLE_CLAUSE',")

    11 "tablespace storage example (original 1 K) ');

    12 ctx_ddl.set_attribute ("mystore', 'I_INDEX_CLAUSE',")

    13 ' example of tablespace storage (initial 1 K) compress 2 ');

    14 ctx_ddl.set_attribute ("mystore', 'P_TABLE_CLAUSE',")

    15 "tablespace storage example (original 1 K) ');

    16 ctx_ddl.set_attribute ("mystore', 'S_TABLE_CLAUSE',")

    17 "tablespace storage example (original 1 K) ');

    18 end;

    19.

    PL/SQL procedure successfully completed.

    Scott@orcl_11gR2 > my_index CREATE INDEX

    2 doc_contents (doc_content)

    3 INDEXTYPE IS CTXSYS. FRAMEWORK

    4 PARAMETERS ('STORAGE mystore')

    5.

    The index is created.

    Scott@orcl_11gR2 > SELECT index_name, nom_tablespace

    2 FROM user_indexes

    3. WHERE index-name LIKE '% MY_INDEX % '.

    4.

    INDEX_NAME TABLESPACE_NAME

    ------------------------------ ------------------------------

    MY_INDEX

    DR.$ MY_INDEX$ X FOR EXAMPLE

    2 selected lines.

    Scott@orcl_11gR2 > SELECT table_name, nom_tablespace

    2 FROM user_tables

    3 WHERE table_name LIKE '% MY_INDEX % '.

    4.

    TABLE_NAME, TABLESPACE_NAME

    ------------------------------ ------------------------------

    DR. MY_INDEX$ I EXAMPLE

    DR.$ MY_INDEX$ R EXAMPLE

    DR.$ MY_INDEX$ N

    DR.$ MY_INDEX$ K

    4 selected lines.

    Post edited by: BarbaraBoehmer (corrected for error due to the already existing preference)

  • How to create indexes of service according to

    Hi all

    I already post a thread associated with this thread, but there is little difference in the two threads.

    I had a query as below:

    Select concept_Un, raw_concept_a, relation_name, concept_b, discovered_relations raw_concept_b, where lower (concept_a) like '% of consumers' and lower (concept_a) like '% confidence % ';


    This query taking too long to run and its high rating.

    cost and execution time: 1155K and 03:51:11

    I changed above query using the Forum gurus, below query is changed:


    Select concept_Un, raw_concept_a, relation_name, concept_b, raw_concept_b

    of discovered_relations

    where regexp_instr (concept_Un, ' (consumer.*confidence) |) ((confidence.*Consumer))', 1, 1, 1, 'i') > 0;

    I created indexes for query modified as well:
    creating index SIDEV. IDX_reg_instr on SIDEV. DISCOVERED_RELATIONS (REGEXP_INSTR ("CONCEPT_A",'(consumer.*confidence) |)) (confidence.*Consumer))', 1, 1, 1, 'i'));

    After that the cost and time to get request reduces to:
    After optimization: 40001 and 08:01

    Now the question is whenever my request will vary as a condition, this means that search string can be vary to any value.

    So I need a basic index as function above is the index which can work for any string in the like operator, now my created index only works very well for the fixed string...

    Thank you

    Abbas85 wrote:

    Hi Chris,

    Thank you very much its working well, now, to reduce the cost and duration of execution, I used below queries as you suggest:

    create index idx_fulltext on discovered_relations (concept_a) indextype is ctxsys.context;

    Select * from discovered_relations

    where contains (concept_a, 'Confidence') > 0 and contains (concept_a, 'Consumer') > 0;

    Hello

    No, you didn't.

    The query I used was

    Select str

    of test_idx

    where

    contains (str, '% of the CONSUMPTION and CONFIDENCE %') > 0

    If you read carefully, you'll notice that I used already found lowercase uppercase searchwords.

    This works because the oracle text case insensitiv default you can read documentation:

    "By default, all text tokens are converted to uppercase and then indexed. This

    results in case-insensitive queries. For example, separate queries for each of

    the three words, CAT cat,

    "and Cat all return the same documents.

    Indexing with Oracle Text

    If you have more to use tiny but need to start to read the oracle text docs ;-)

  • Index rebuild after moving table to a different tablespace?

    Index rebuild after moving table to a different tablespace?

    Oracle-Meng wrote:

    Index rebuild after moving table to a different tablespace?

    Only if you want to reuse.

    See DBA guide

    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/tables006.htm#i1106606

    Pass an array to a new Segment or a Tablespace

    Move a table changes the ROWID of the rows in the table. This causes the indexes on the table to be marked UNUSABLE , and DML, access the table using these clues you will receive an ORA-01502 error. The indexes on the table must be deleted or rebuilt. Similarly, all the statistics in the table become invalid and new statistics should be collected after the removal of the table.

  • Create index partition in the partition table tablespace

    Hello

    I am running a work custom that

    * Creates a tablespace by day
    * Creates the daily table partition in the created tablespace
    * Removes the days tablepartition X
    * Removes the storage space for this partition of X + 1 day.

    The work above works perfectly, but it has problems with the management of the index for these partitioned tables. In the old database (10g - single node), all indexes and partitions exist in a BIG tablespace and when I imported the table creation script in the new database, I changed all the partitions table & index to go in their respective space.

    For example:

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================............====================...........=================
    TABL1... TABL1_2012_07_16... TABL1_IDX_2012_07_16... TBS_2012_07_16
    TABL1... TABL1_2012_07_15... TABL1_IDX_2012_07_15... TBS_2012_07_15


    But now, when the job is run, it creates the index in the tablespace TBS_DATA default.

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================.............====================...........=================
    TABL1... TABL1_2012_08_16... TABL1_IDX_2012_08_16... TBS_DATA
    TABL1... TABL1_2012_08_15... TABL1_IDX_2012_08_15... TBS_DATA


    I can issue alter index rebuild to move the index to its tablespace default, but how can I make sure that the index is created in the designated tablespace?

    NOTE: the partition/tablespace management work that I run only creates the partition of the table and not the index.


    The new env is a cluster of CARS of 2 nodes 11 GR 2 on Linux x86_64.


    Thanks in advance,
    aBBy.

    try something like this

    ALTER table tab_owner.tab_name add the partition v_new_part_nm
    values less (to_date('''|| v_new_part_dt_formatted ||'') ((', "DD-MON-YYYY)) tablespace ' | part_tbs
    update the index (ind1_name (partition ind_partition_name tablespace ind_part_tbs)
    ind2_name (partition tablespace ind_part_tbs ind_partition_name))
    ;

  • Events of waiting "log file parallel write" / "log file sync", in CREATE INDEX

    Hello guys,.
    my current project I'm running a few tests of performance for oracle data guard. The question is "How LGWR SYNC transfer influence the performance of the system?"
    For the performance of the values, that I can compare I just built a normal oracle database in the first step.

    Now I perform various tests such as creating index 'broad', massive parallel inserts/validations, etc to get the marks.

    My database is an oracle 10.2.0.4 with multiplexed on AIX log files.

    I create an index on a table of "normal"... I have run "dbms_workload_repository.create_snapshot ()" before and after the CREATE INDEX for an equivalent period for the AWR report.
    Once the index is built (round about 9 GB), I made an awrrpt.sql for the AWR report.

    And now take a look at these values of the AWR
                                                                       Avg
                                                 %Time  Total Wait    wait     Waits
    Event                                 Waits  -outs    Time (s)    (ms)      /txn
    ---------------------------- -------------- ------ ----------- ------- ---------
    ......
    ......
    log file parallel write              10,019     .0         132      13      33.5
    log file sync                           293     .7           4      15       1.0
    ......
    ......
    How can it be possible?

    With regard to the documentation

    -> synchronization of log file: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3120
    Wait Time: The wait time includes the writing of the log buffer and the post.
    -> log file parallel write: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3104
    Wait Time: Time it takes for the I/Os to complete. Even though redo records are written in parallel, the parallel write is not complete until the last I/O is on disk.
    This was also my understanding... "log file sync" wait time should be higher than the 'parallel log writing' timeout, because of, it includes the e/s and the response time for the user's session.
    I could accept it, if the values are near each other (perhaps around 1 second about altogether)... but the difference between 132 and 4 seconds is too visible.

    Is the behavior of the log file sync/write different when you do a DOF as CREATE INDEX (maybe async... like you can influence it with COMMIT_WRITE initialization parameter?)?
    You have no idea how these values born?


    Ideas/thoughts are welcome.

    Thanks and greetings
  • Cannot create Index with an If statement

    Hello:

    I would run the code to create an index on a given table, but only if the index does not exist. Here's what I have so far...

    DECLARE
    c_Count NUMBER;
    BEGIN
    SELECT COUNT (*) FROM c_Count
    OF DBA_INDEXES
    WHERE TABLE_NAME = 'SOME_TABLE_NAME '.
    AND INDEX_NAME = "SOME_INDEX_NAME."
    AND OWNER = 'SOME_OWNER. '
    AND TABLE_OWNER = "SOME_OWNER";
    IF c_Count = 0 THEN

    CREATE INDEXES SOME_OWNER. SOME_INDEX ON SOME_OWNER. UNE_TABLE (SOME_KEY);
    END IF;
    END;

    The SELECT INTO statement works well alone.
    Boredom comes with the IF statement. I get the following error message:

    PLS-00103: encountered the symbol "CREATE" when waiting for one of the following values: begin case declare exit for goto if loop...

    This is the typical error saying that the syntax is incorrect, and that the parser was expecting something else after the IF-THEN statement. Any ideas on what may be a problem? Thanks in advance.

    Jerry

    Hello

    You must use EXECUTE IMMEDIATE to the DDL in PL/SQL.

    DECLARE
       c_Count NUMBER;
    BEGIN
       SELECT COUNT(*)
         INTO c_Count
         FROM DBA_INDEXES
        WHERE TABLE_NAME = 'SOME_TABLE_NAME'
          AND INDEX_NAME = 'SOME_INDEX_NAME'
          AND OWNER = 'SOME_OWNER'
          AND TABLE_OWNER = 'SOME_OWNER';
       IF c_Count = 0 THEN
          EXECUTE IMMEDIATE 'CREATE INDEX SOME_OWNER.SOME_INDEX ON SOME_OWNER.SOME_TABLE(SOME_KEY)';
       END IF;
    END;
    

    Kind regards

  • Desktop HP Pavilion 500-210 a: I want to try Linux Mint cinnamon from a USB key that I created but struggle after pressing F10

    I want to try Linux Mint cinnamon from a USB key that I created but struggle after press F10 and enter? BIOS - sound very unlike the BIOS on my old desktop WIN 7, any help at all would be great! I'm a technophobe bit I'm afraid. Thanks for reading.

    @muirbabe

    Please don't feel not bad not respond sooner.  I'm always notified when one of the sons that I am working on has a new addition.

    I don't know if you have a specific reason to use the Linux distro you chose or if you consider a recommendation.  I used Ubuntu (prn. oo-boon-too) for several years as a dual boot with Windows.  Not only is it a great distribution, but there is a very good Forum.  Not as good as this , but very good.  The members of the Forum are very useful.  You can give it a thought.  I think they would get you to the top and run very fast.

  • Slideshow with music created using Windows Vista Movie maker - but it can't download Facebook like not supported file - how do I make this compatible film

    I created a slide show movie maker in Windows Vista - but it will only play on the movie maker - cannot download on facebook; the burned DVD is not compatible with basic DVD players.  Nothing does support that kind of file - how can I convert this file into something that can be shared and played on other devices.

    . MSWMM is not a movie file... This is a Movie Maker project
    file is useful for a re-release in Movie Maker.

    If publish you (save) project in the. Film WMV format...
    It can be played in Windows Media Player, shared with
    other people and burned on a DVD-video using Windows DVD
    Maker.

    See Help on editing the following articles:

    Windows Vista - publish a movie in Windows Movie Maker
    http://Windows.Microsoft.com/en-us/Windows-Vista/publish-a-movie-in-Windows-Movie-Maker

    Movie Maker Vista - Edition
    http://www.Papajohn.org/Vista-publishing.html

    Windows Vista - Windows DVD Maker - burn video disc
    http://Windows.Microsoft.com/en-us/Windows-Vista/burn-a-DVD-video-disc

  • Creating indexes for the table

    can someone help me how to create indexes in the table. I m creating own table... I need to select a particular field in the table. So I need to calculate the index position. I use my code like this,

    This will returnthe number of columns in the table.

    Class array

    {

    private int Table_Index()
    {
    for (int x = 0; x)<>
    {
    table_index = x;
    }
    Return table_index;
    }

    }

    MainClass can I get this length of Index

    Table T1;

    int t1 is T1. Table_Index();

    This property returns my length (4) of table column

    Using this index (t1) I HAV to see what position I'm at table now...

    someone help me...

    You can use a listfield, he supports methods to get the selected row and its contents.

  • How to create a DVD from Movie Maker?

    I have the Windows live movie maker, which came with my new PC, but I can't find any way to burn a DVD.  How can I download this ability?

    Original title: Movie maker on a DVD.

    Hello

    Please follow the steps in the link below to create a DVD from Movie Maker.

    Burn a DVD-video using Windows DVD Maker disc

    http://Windows.Microsoft.com/en-us/Windows7/burn-a-DVD-video-disc-with-Windows-DVD-Maker

    You can also go through the steps mentioned by J to volunteer for more information.

    Windows Live Movie Maker-how burning the project to DVD for playback on TV

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/Windows-Live-Movie-Maker-how-to-burn-project-to/dd8d264f-69f7-41A7-B67B-5eeeb9ad41b6

    You can also post your queries to the Windows Live support for more information.

    Movie Maker Portal

    http://windowslivehelp.com/product.aspx?ProductID=5

    Hope this information is useful.

  • I use Windows Live DVD Maker to create DVD movies to play on regular DVD players. But how can I burn these HD movies created in MS Live Movie Maker on Blu Ray?

    Projects of direct burning on Blu Ray?

    I use Windows Live DVD Maker to create DVD movies to play on regular DVD players.  But how can I burn these HD movies created in MS Live Movie Maker on Blu Ray?

    I think that you need a more powerful software. A Google search for:
    "Blu - Ray Authoring Software" could be a place to start.

  • CREATE INDEXES online is waiting for the TX = 4 mode

    Hello

    I have a strange blocking problem where an INDEX CREATE LINE is waiting for a transaction that did only inserted a line in the parent table.

    Wait is mode TX = 4 (not TM locks) and I currently have it reproduced only on 11.2.0.3 and 11.2.0.4

    Easy to replicate the schema SCOTT:

    Session 1:

    SQL > set time on

    14:54:58 SQL > insert into SCOTT. Dept (DEPTNO, dname) values (50, 'test');

    1 line of creation.

    Session 2;

    14:55:24 SQL > create index test on SCOTT. EMP (ename) online;

    It's waiting ' enq: TX - line lock conflict ":"

    SQL > select sid, chain_signature from v$ wait_chains where blocker_is_valid = 'TRUE '.

    SID CHAIN_SIGNATURE

    ---------- ----------------------------------------------------------------------

    603 ' SQL * Net client message' < ='enq: TX - line lock conflict '

    While waiting to acquire the lock of transaction in mode 4:

    SQL > select * lock gv$ where sid = 603

    INST_ID SELECT ADDR KADDR SID TYPE ID1 ID2 LMODE CTIME BLOCK REQUEST

    ---------- ---------------- ---------------- ---------- ---- ---------- ---------- ---------- ---------- ---------- ----------

    1 00000006CDA05EB8 00000006CDA05F10 603 352577 0 4 0 348 2 AE

    1 00000006CDA06078 00000006CDA060D0 603 DL 779505 0 3 0 308 2

    1 00000006CD9FABE0 00000006CD9FAC38 603 DL 779505 0 3 0 308 2

    1 00007F28001F5028 00007F28001F5088 603 779505 0 2 0 308 2 TM

    1 00007F28001F5028 00007F28001F5088 603 779510 0 4 0 308 2 TM

    1 00000006CD9FA240 00000006CD9FA298 603 779505 0 4 0 308 2 OD

    1 00000006B4F26790 00000006B4F26808 589847 711499 6 0 308 2 TX 603

    1 00000006CDA0ED68 00000006CDA0EDC0 655377 996169 0 4 308 TX 603 0

    I've traced 10046 and 10704:

    broadcast message = obj 29231196672 #= 779514 tim = 1447251053634045

    ksqgtl * mode TX-000f001e-000ad97c = 4 flags = 0 x 10001 timeout = 21474836 *.

    ksqgtl: xcb = 0x6bb322528, ktcdix = 2147483647, topxcb = 0x6bb322528

    ktcipt (topxcb) = 0 x 0

    ksucti: init logon has of txn DID:

    ksqgtl:

    ksqlkdid: 0001-003F-0000AFC4

    ksudidTrace: ksqgtl

    ktcmydid(): 0001-003F-0000AFC4

    ksusesdi: 0001-003F-0000AFC3

    ksusetxn: 0001-003F-0000AFC4

    ksqcmi: TX, f001e, ad97c mode = 4 timeout = 21474836

    2015-11-11 15:11:36.566

    WAITING #140700792578680: nam ='enq: TX - line lock conflict ' ela 42932082 name = | mode = 1415053316 usn < < 16 | location = sequence 983070 = obj 711036 #= 779514 tim = 1447251096566283

    And there is nothing in V$ SESSION leader/block/line current. class obj # is EMP. current sql_id is the CREATE INDEX.

    If anyone has an idea on:

    -Why creating an index in line must wait for transactions that modified only parent table

    -How to continue the investigation

    -can or cannot reproduce in other versions

    Thanks in advance,

    Franck.

    I guess you have a constraint foreign key between emp and Dept.

    It's expected behaviours: since 11.1 any DML at one end of a referential integrity constraint translates into a mode lock 3 taken at the other end, and your phenomenon resembles a side effect of this.

    When you try to create the index online that your session must assume that the other session (holding mode 3 on the emp and dept) may have changed the emp and dept, so it must wait for the session to the commit or rollback.

    (I guess that in principle, he could walk the cancellation of the transaction see if EMP had in fact been changed - but maybe who was considered too complicated to be worth the risk to implement)

    Concerning

    Jonathan Lewis

    Updated - I just did a quick check to reproduce the effect on 11.1.0.7

    For reference - here are a few notes on modes of locking and how the application has changed over time: https://jonathanlewis.wordpress.com/2010/06/21/locks/

Maybe you are looking for