Unique key on the partitioned table range

Hello

We use a range of composite range-hash partitioned table

Use index - try to do this have same tablespace to the local partitions but not liking it

ALTER table RETAILER_TRANSACTION_COMP_POR
Add primary key constraint RETAILER_TRANSACTION_COMP_PK (DWH_NUM)
using index
LOCAL


ORA-14039: partitioning columns must be a subset of the columns in a unique index key

Without local then fine but does not have same tablespace to walls and don't want to make this part of the partition key.

Range Tbal partitioned - it's just a UK to avoid duplicates
[oracle@localhost ~]$ oerr ora 14039
14039, 00000, "partitioning columns must form a subset of key columns of a UNIQUE index"
// *Cause:  User attempted to create a UNIQUE partitioned index whose
//          partitioning columns do not form a subset of its key columns
//          which is illegal
// *Action: If the user, indeed, desired to create an index whose
//          partitioning columns do not form a subset of its key columns,
//          it must be created as non-UNIQUE; otherwise, correct the
//          list of key and/or partitioning columns to ensure that the index'
//          partitioning columns form a subset of its key columns

Tags: Database

Similar Questions

  • Why the partitioned table cannot create?

    Why the partitioned table cannot successfully create?
    SQL> create table hr.gps_log_his
      2  (id number,
      3  name varchar2(10),
      4  time date)
      5  tablespace ts_log_his
      6  PARTITION BY RANGE (TIME)
      7  (PARTITION udp_part2009110707 VALUES LESS THAN (TO_DATE('2009110708','yyyymmddhh24')),
      8  PARTITION udp_part2009110708 VALUES LESS THAN (TO_DATE('2009110709','yyyymmddhh24')),
      9  PARTITION udp_part2009110709 VALUES LESS THAN (TO_DATE('2009110710','yyyymmddhh24')),
     10  );
    )
    *
    Error in line 10:
    ORA-14004: Missing PARTITION key word.

    Hello

    Your problem is the comma ending line 9. Delete this.

    Concerning
    Peter

  • Please choose a unique key in the selected Recordset or click Cancel - DWCC2015 error

    I am trying to add a form to UPDATE in the PCOC assistance from the server behaviors panel and when I have it, select the unique primary key in my database table, I am presented with the following error:

    "Please choose a unique key in the selected Recordset or click Cancel.

    I tripled checked - the key that I select is correct, it is a primary key in my table of MSSQL database - it does not accept it.

    Any ideas?  Clear the Cache of DW and start over?

    Thank you.

    NJ

    As I suggested in another thread, if you really need to use the obsolete server behaviors, install Dreamweaver CS6, which is included in your subscription to creative cloud. Better yet, stop using the server behaviors. They have been deleted, because the code is desperately obsolete. It will stop working in PHP 7, coming in the next two weeks.

  • How to configure the partition table for SSD?

    Drive: 32 GB SSD

    I accidentally delete without backup partition table information and would like to know how to put the partition table, I can access the tools of partition table, but do not know how to define.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Hello

    Thanks for posting your query in Microsoft Community.

    The SSD could be seen in the disk management window, and you could name and set up as another hard drive internal. To create a partition or volume on a hard disk, you must be logged in as an administrator, and there must be unallocated disk space or free space in an extended hard disk partition. To repartition your hard drive, please consult the following link and check if it helps.

    I can I repartition my hard disk?

    Additional information:

    Create a new Partition on a hard disk in Windows 7

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • Assistance button works do not (= does ' t start VAIO Care Rescue) after having lost and recover the partition table / MBR

    Hello

    For some reason that I lost my patition table but I was able to get it back and I'm rewriting MBR. I'll be back all my partition and files contain the VAIO recovery partition except files on the operating system partition ("C:\ »). It's an unformatted partition. VAIO Care rescue didn't work so I had to format "C:\". "and reinstall windows 7 and now all is good.

    I have VAIO Care Rescue. I think that it is enough to change the partition table / MBR. What exactly is the problem and is it possible to fix the problem of button Assist?


    And if one removes all xxxx (include VAIO Recovery) and creates new ones, is it possible, software or image of the recovery restore partition and Assist button start VAIO Care Rescue?

    My laptop model: VPCEA25FG

    Thank you

    You can restore your computer back to factory with all the pre program and software installed by using recovery discs. For further assistance, please recommend contacting Sony's Support Center in your area at http://www.sony-asia.com/support/product/VPCEA25FGfor your model of Asia-Pacific computer. Thank you.

    If my post answered your question, please mark it as "accept as a Solution.

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

  • Desperately need help - "the partition table on device sda was unreadable." Erase all data?

    I'm forced to install CentOs on my Macbook using a machine virtual (VMWare, which is what I downloaded my teacher recommended). It's for my first class of operating systems, so bare with me because I don't know anything about operating systems (except about how to use Windows and my Macbook). I am also a daughter, what makes my same technical knowledge that much more rare. However, I am eager to learn...

    In any case, I downloaded them both. When I launch Fusion, I choose the file> New> install Windows or another OS on a virtual machine> continue without disk> click on the button that says 'Operating system installation disc using image file'> then I select the appropriate iso CentOS (CentOS - 5.4 - i386-bin-1of6) file> continue> drop down lists, I choose LINUX as operating system and Red Hat Enterprise Linux 5 as my Version> continue-> finish (no customization settings). It appears the screen of CentOS and I am invited by a text asking me if I want to install in text or graphics mode. (Don't know what to do here, but I select the graph). A bunch of white text scroll a screen of black background, then a blue screen shows up saying: 'Welcome to CentOS' at the top and a gray screen that says "to start testing CD media before installation OK press. Choose Ignore to ignore the media test and launch the installation. "I click on the red button (even once, if it is incorrect, let me know). A few rows of white text on black background (from anaconda... something on a video card...) then a nice graphic display of CentOS which I click NEXT. I then select English as my tongue (twice) and I gives me the message:

    "The partition table on device sda (VMware, VMware Virtual S 20473 MB) was unreadable. To create new partitions, it must be initialized, cauing the loss of all DATA on this drive. This operation will replace all choice on what players to ignore previous installation. You would like to initialize this drive, erasing all THE DATA? »

    I have no idea what to do here. I googled the message and others have been too, but they can talk about some hard file (and I have no idea what it is, and I can't seem to find mine).

    I can't lose what's on my hard drive (my school, music, photos, applications, files etc.). Clicking YES will erase my HD? I'm terribly afraid. I need to get this thing installed so I can do my operating systems class work, but I don't know if I did the installation correctly so far and especially, what to click at this point. Can someone help me out please (I spent 4 hours on this one today. "I have no one else to ask)? Finally, the installation is almost done after this step?

    Any help at all would be so greatly appreciated.

    I do not use Fusion, but I have VMware Workstation on Windows. I went through the same process that you went through. The answer to your question is that when you choose the operating system you install and you choose the option for the installation disc, it creates a virtual hard drive for you, size 20 GB. When they ask you to erase the hard drive, it's clear that virtual you create, not your actual computer hard drive. You can check by looking at the properties of the hard drive on your computer. It's probably 250 GB or 500 GB or something big like this. The CentOS WARNING speaks of a 20 GB hard drive, which is the size of the disk that VMware Fusion (and Workstation) create for CentOS.

  • query the partition tables

    Hi all

    I want to query the partition tables that are over 1 GB in size?

    How can I ask questions?

    Salvation;

    You can also try with dba_tab_partitions view

    Respect of
    HELIOS

  • How to find the size of the partitioned tables?

    How to find the size of the partitioned tables?

    Select nom_segment, sum (bytes) /(1024*1024) 'Size in MB' from dba_segments
    where owner = 'owner name' and segment_type like '% PARTITION % '.
    Group by nom_segment;

  • Partitioned global index on partitioned table range, but the index partition does not work

    Hello:

    I was creating an index partitioned on table partitioned and partitioned index does not work.

    create table table_range)

    CUST_FIRST_NAME VARCHAR2 (20).

    CUST_GENDER CHAR (1),

    CUST_CITY VARCHAR2 (30),

    COUNTRY_ISO_CODE CHAR (2),

    COUNTRY_NAME VARCHAR2 (40),

    COUNTRY_SUBREGION VARCHAR2 (30),

    PROD_ID NUMBER NOT NULL,

    CUST_ID NUMBER NOT NULL,

    TIME_ID DATE NOT NULL,

    CHANNEL_ID NUMBER NOT NULL,

    PROMO_ID NUMBER OF NON-NULL,

    QUANTITY_SOLD NUMBER (10.2) NOT NULL,

    AMOUNT_SOLD NUMBER (10.2) NOT NULL

    )

    partition by (range (time_id)

    lower partition p1 values (u01 tablespace to_date('2001/01/01','YYYY/MM/DD')),

    lower partition (to_date('2002/01/01','YYYY/MM/DD')) tablespace u02 p2 values

    );

    create index ind_table_range on table2 (prod_id)

    () global partition range (prod_id)

    values less than (100) partition p1,

    lower partition p2 values (maxvalue)

    );

    SQL > select TABLE_NAME, SUBPARTITION_COUNT, HIGH_VALUE, nom_partition NUM_ROWS of user_tab_partitions;

    TABLE_NAME NOM_PARTITION SUBPARTITION_COUNT HIGH_VALUE NUM_ROWS

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

    TABLE_RANGE P2 0 TO_DATE (' 2002-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 259418)

    TABLE_RANGE P1 0 TO_DATE (' 2001-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 659425)

    SQL > select INDEX_NAME, NUM_ROWS nom_partition, HIGH_VALUE user_ind_partitions;

    INDEX_NAME NOM_PARTITION HIGH_VALUE NUM_ROWS

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

    P1 IND_TABLE_RANGE 100 479520

    IND_TABLE_RANGE P2 MAXVALUE 439323

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > set autotrace traceonly

    SQL > alter shared_pool RAS system;

    SQL > changes the system built-in buffer_cache;

    SQL > select * from table_range

    where prod_id = 127;

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

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

    |   0 | SELECT STATEMENT |             | 16469 |  1334K |  3579 (1) | 00:00:43 |       |       |

    |   1.  RANGE OF PARTITION ALL THE |             | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

    |*  2 |   TABLE ACCESS FULL | TABLE_RANGE | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

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

    Information of predicates (identified by the operation identity card):

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

    2 - filter ("PROD_ID" = 127)

    Statistics

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

    320 recursive calls

    2 db block Gets

    13352 consistent gets

    11820 physical reads

    0 redo size

    855198 bytes sent via SQL * Net to client

    12135 bytes received via SQL * Net from client

    1067 SQL * Net back and forth to and from the client

    61 sorts (memory)

    0 sorts (disk)

    15984 rows processed

    Once the sentence you say ' does not ' and then you go to paste plans that seem to show that it "works".

    What gives?

    In fact, if you look at the plans - think Oracle you have 16 k rows in the table and he'll be back k 12 rows for your select statement. In this case, Oracle is picking up the right plan - full scan 16 ranks of k is a lot less work to digitize the index lines k 12 followed by the research of rank k 12 rowid.

  • modify an existing table to selectively the partition interval range

    I'm using Oracle 11.2.0.3.

    I have an existing table that has parition interval range.

    example:
     
    create table Log( ts date, level  varchar2(20), scr varchar2(2000))PARTITION BY RANGE (TS)
    INTERVAL( NUMTODSINTERVAL(1,'DAY'))
    Currently, we have the log of the table that is the partition of the range by day and we drop old parition to a week. However, we want to change this to persist the records in the table of WHICH = LEVEL "IMPORTANT."

    What is the best way to achieve this?

    >
    Is it possible to modify the existing interval partition table to add partition in the list?
    >
    Only using the DBMS_REDEFINITION to do online. And that always involves the creation of a "provisional" table

    If you have a window of failure just to create a new partitioned table the way you want to and INSERT the data into it. You should be able to use a DEC to do if you want. You may not use swap partition since all data must be physically moved.
    >
    Can we do list-interval partition table i.e. (with partition interval as partition sup)?
    >
    No - subpartitioning of interval is not currently supported.

    Here is the code example of a partitioned table by using the RANGE-interval LIST. It uses a VIRTUAL column, but you can ignore it for your use case

    DROP TABLE mytable;
    
    CREATE TABLE mytable
    (
    CREATION_DATE TIMESTAMP(6),
    LAST_MODIFIED_DATE TIMESTAMP(6),
    CREATION_DAY NUMBER(2) GENERATED ALWAYS AS (TO_NUMBER(TO_CHAR(CREATION_DATE, 'DD'))) VIRTUAL
    )
    PARTITION BY RANGE (LAST_MODIFIED_DATE) INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    SUBPARTITION BY LIST (CREATION_DAY)
       SUBPARTITION TEMPLATE
       ( SUBPARTITION days_1_5 VALUES (1,2,3,4,5)
       , SUBPARTITION days_6_10 VALUES (6,7,8,9,10)
       , SUBPARTITION days_11_15 VALUES (11,12,13,14,15)
       , SUBPARTITION days_16_20 VALUES (16,17,18,19,20)
       , SUBPARTITION days_21_25 VALUES (21,22,23,24,25)
       , SUBPARTITION days_26_31 VALUES (26,27,28,29,30,31)
       )
    (
       PARTITION prior_to_2013 VALUES LESS THAN (TO_DATE('2013-01-01', 'YYYY-MM-DD'))
    )
    
  • Try to convert the partitioned Table of interval in the range... Swap partition...

    Requirement:

    Interval of replacement partitioned Table by range partitioned Table
    DROP TABLE A;
    
    CREATE TABLE A
    (
       a              NUMBER,
       CreationDate   DATE
    )
    PARTITION BY RANGE (CreationDate)
       INTERVAL ( NUMTODSINTERVAL (30, 'DAY') )
       (PARTITION P_FIRST
           VALUES LESS THAN (TIMESTAMP ' 2001-01-01 00:00:00'));
    
    
    INSERT INTO A
         VALUES (1, SYSDATE);
    
    INSERT INTO A
         VALUES (1, SYSDATE - 30);
    
    INSERT INTO A
         VALUES (1, SYSDATE - 60);
    I need to change this partitioned Table apart to a partitioned range Table. I can do using the EXCHANGE PARTITION. Like if I use the classic method to create another table range partitioned, then:

    DROP TABLE A_Range
    CREATE TABLE A_Range
    (
    a NUMBER,
    CreationDate DATE
    )
    PARTITION BY RANGE (CreationDate)
       (partition MAX values less than (MAXVALUE));
    
    Insert  /*+ append */  into A_Range Select * from A; --This Step takes very very long..Trying to cut it short using Exchange Partition.
    Problems:

    I can't do
     ALTER TABLE A_Range
      EXCHANGE PARTITION MAX
      WITH TABLE A
      WITHOUT VALIDATION;
     
    ORA-14095: ALTER TABLE CHANGE requires a not partitioned table nonclustered
    This is because the tables are partitioned. So it does not allow me.

    If I instead:


    Create a table that is not partitioned for exchanging data by partition.
      Create Table A_Temp as Select * from A;
      
       ALTER TABLE A_Range
      EXCHANGE PARTITION MAX
      WITH TABLE A_TEMP
      WITHOUT VALIDATION;
       
      select count(*) from A_Range partition(MAX);
     
    -The problem is that all the data is in MAX Partition.
    Even after the creation of a large number of partitions by walls of separation, the data is still in MAX Partition only.

    So:

    -What we cannot replace a partitioned Table to the Table partitioned using the EXCHANGE PARTITION range interval. that is, we have to insert in...
    -We can do it, but I'm missing something here.
    -If all the data is in MAX Partition due to "WITHOUT VALIDATION", can say us be redistributed in the right type of range partitions.

    You must pre-create the partitions in a_range and then swap one for one for a tmp, and then to arange. With the help of your sample (thanks to proviing code, incidentally).

    SQL> CREATE TABLE A
      2  (
      3     a              NUMBER,
      4     CreationDate   DATE
      5  )
      6  PARTITION BY RANGE (CreationDate)
      7     INTERVAL ( NUMTODSINTERVAL (30, 'DAY') )
      8     (PARTITION P_FIRST
      9         VALUES LESS THAN (TIMESTAMP ' 2001-01-01 00:00:00'));
    
    Table created.
    
    SQL> INSERT INTO A VALUES (1, SYSDATE);
    
    1 row created.
    
    SQL> INSERT INTO A VALUES (1, SYSDATE - 30);
    
    1 row created.
    
    SQL> INSERT INTO A VALUES (1, SYSDATE - 60);
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    

    You can find the form of existing partitions assistance:

    SQL> select table_name, partition_name, high_value
      2  from user_tab_partitions
      3  where table_name = 'A';
    
    TABLE_NAME PARTITION_NAME HIGH_VALUE
    ---------- -------------- --------------------------------------------------------------------------------
    A          P_FIRST        TO_DATE(' 2001-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P44        TO_DATE(' 2013-01-28 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P45        TO_DATE(' 2012-12-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    A          SYS_P46        TO_DATE(' 2012-11-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
    

    You can then create the table a_range with apporopriate partitions. Note that you may need to create additional in a_range partitions because the partitioning interval does not create the partitions has no data for, even if that leaves 'holes' in the partitioning scheme. So, on that basis:

    SQL> CREATE TABLE A_Range (
      2     a NUMBER,
      3     CreationDate DATE)
      4  PARTITION BY RANGE (CreationDate)
      5     (partition Nov_2012 values less than (to_date('30-nov-2012', 'dd-mon-yyyy')),
      6      partition Dec_2012 values less than (to_date('31-dec-2012', 'dd-mon-yyyy')),
      7      partition Jan_2013 values less than (to_date('31-jan-2013', 'dd-mon-yyyy')),
      8      partition MAX values less than (MAXVALUE));
    
    Table created.
    

    Now, create a regular table to use in the constituencies:

    SQL> CREATE TABLE A_tmp (
      2     a              NUMBER,
      3     CreationDate   DATE);
    
    Table created.
    

    and all partitions in Exchange:

    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p44
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION jan_2013
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p45
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION dec_2012
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> ALTER TABLE A
      2    EXCHANGE PARTITION sys_p46
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> ALTER TABLE A_Range
      2    EXCHANGE PARTITION nov_2012
      3    WITH TABLE A_tmp;
    
    Table altered.
    
    SQL> select * from a;
    
    no rows selected
    
    SQL> select * from a_range;
    
             A CREATIOND
    ---------- ---------
             1 23-NOV-12
             1 23-DEC-12
             1 22-JAN-13
    

    John

  • Local primary key on reference partitioned Table

    Oracle running on Red Hat Linux Rel6 11.2.0.3.

    I'm on a closed network, so the following must be typed manually.

    I have a table of documents which is essentially the following:

    (entire annual <-primary key)

    whole Source_ID,

    load_dt date,

    date of doc_dt,

    doc_info clob,

    ...)

    which is partitioned on column source_id.

    I created a partitioned table of reference as follows:

    create table doc_entities_prt)

    whole doc_entity_id

    all annual,

    whole entity_id,

    forced doc_ent_fk (annual) references to documents (annual)

    tablespace...

    allow the movement of the line

    benchmark score (doc_ent_fk);

    The annual column in the child table is not unique.  The doc_entity_id column is unique.  I want to set the primary key on doc_entities_prt as a local index on the doc_entity_id column.  I was not able to find the proper syntax to get there, and now I'm wondering if this is even possible? Any ideas appreciated.

    Oops, I missed part that you want to base the PK of this index. No, it is not possible and has nothing to do with the partitoning reference. A unique index can be partitioned only if it includes a partitioning column. You can create a non-unique without partitioning column partitioned index, but then you can't create PK supported by such an index for the same reason - oracle would not be able to verify uniquenes based on this index partition and controls of the cross-partition are not supported:

    SQL > create table documents)
    2 whole annual,
    3 whole source_id,
    load_dt date 4.
    date of doc_dt 5.
    6 doc_info clob
    7                        )
    8 partition by range (source_id)
    9      (
    10 partition p1 values less than (10),
    11 partition p2 values less than (100)
    12)
    13.

    Table created.

    SQL > create index unique documents_pk
    2 on documents (annual)
    (3) local
    partition 4 p1,
    5 partition p2
    6         )
    7.
    on documents (annual)
    *
    ERROR on line 2:
    ORA-14039: partitioning columns must be a subset of the columns of a unique key
    index

    SQL > create index documents_pk
    2 on documents (annual)
    (3) local
    partition 4 p1,
    5 partition p2
    6         )
    7.

    The index is created.

    SQL > alter table documents
    2 Add the constraint documents_pk
    3 key (annual) elementary school
    4 using index documents_pk
    5.
    change the documents table
    *
    ERROR on line 1:
    ORA-14196: specified Index cannot be used to apply the constraint.

    SQL >

    SY.

  • Unique key violation - the DB adapter

    Hello

    I have a composite SOA (deployed in clusters of 4 nodes) who questions database and calls a stored procedure (which invokes the records in multiple tables). Now, when I'll be large amount of data in the source database, the composite is mark and tries to insert the records in the target database. But sometimes error cases dating violation of unique key constraint while inserting records into the target database.

    Is locks of adapter DB table before inserting the records so that others may not violate the constraints and they will be able to see changes made by other SOA forums?

    Thank you!

    Yes, certainly not DbAdapter... the problem is the way you do your check and the lack of a facility of mutex in BPEL... Assuming you are using BPEL...

    Ideal scenario...

    1 check key has... There is no instance

    example 1 - insert the key... was ok

    example 2 - check button has exist......

    instance 2 - updates of key has... ok

    Parallel scenario...

    1 check key has... There is no instance

    2 check key has... There is no instance

    example 1 - insert the key... was ok

    example 2 - Insert key a... failure... duplicate a key...

    Hope you get what I'm trying to show here... There is nothing there to prevent another instance to check the existence of the key even before the first instance commits the transaction that inserted the key...

    BPEL is not a mutex AFAIK... something like the statement "synchronized" in Java for example...

    https://docs.Oracle.com/javase/tutorial/essential/concurrency/locksync.html

    Thus, you must use a different approach, for example, try and introduce first always, if the insertion fails try and update... It's 'thread safe' than the approach that you use...

    Much better is to is to abandon controls at all and always insert using the key substitution, such as sequences or guid... If you insert an Oracle database, simply use a sequence, or use the function generate GUIDs BPEL...

    https://en.Wikipedia.org/wiki/Surrogate_key

    See you soon,.

    Vlad

  • Why not all the partition tables

    Hello

    In our project we propse to all partition tables (even if they are small, in MBs) in order to use the feature partiion exchange.
    But our DBAs say that maintenance will be a problem if create us partitions for each table. We said, only tablespace is fine for all partitions that we thought to maintain storage different is a problem.
    But always DBA are not approved.
    I just want to know what are the disadvantages of partitioning. Why DBA are generally against the idea of creating partitions. If we use the same storage space for all of the partitions is there any side down for creating partitions for each table?
    Is there is disadvantage?



    Thank you
    Pramod Garre

    Pramod Garre wrote:
    We plan to use range partitioning (in the quarters).
    There is a duty to remove a quarter of the table data, then refresh with new data as and when the user update some recored of frontend.this should arrive in real-time.

    Looks like you are having the app trigger partition management... which doesn't seem a good idea.
    It also looks like you really don't have justification for partitioning on a few tables. Far from being the "all" tables you inquired. And even that looks like your concept of the use of these scores may be wrong.

    Why not work with your databases instead of look at foreigners for the justification to fight them. Sounds to me like they are doing exactly what they were hired to do.

    We thought instead of delete and insert, if we use excahnge partitions, it will be real quick as Exchange just updated partition in the dictionary.
    On these lines, do you think that it be the disadvantages of the use of partitioning?

    Note: Delete and Insert works OK (2 minutes) compared to the swap partition (20 ms).

    And Yes, each table has PK.

    Thank you
    Pramod Garre

Maybe you are looking for