doubt in a table subpartitioning

Hi gems... good evening...

I have a table that was previously only range partitions.
Now I changed it to the partitioning composite range-hash.

There are 6 partition tablespaces namely TS_PART1, TS_PART2... TS_PART 6.
The default tablespace of the schema is TS_PROD.

The table had following structure previously:


create the table ORDER_BOOK
(
CUST_ID NUMBER (10),
PROFILE_ID NUMBER (10),
PRODUCT_ID NUMBER (10),
SUB_PROFILE_ID VARCHAR2 (25).
DATE OF CASHFLOW_DATE,
NUMBER (24.6) OF EARNINGS.
constraint ORDER_BOOK_PK primary key (CUST_ID, PROFILE_ID, PRODUCT_ID, SUB_PROFILE_ID, CASHFLOW_DATE)
)
partition by range (CASHFLOW_DATE)
(
partition values ORDER_BOOK_PART1 less (TO_DATE (January 1, 2003 ',' DD-MM-YYYY "")) tablespace TS_PART1;
partition values ORDER_BOOK_PART2 less (TO_DATE (January 1, 2006 ',' DD-MM-YYYY "")) tablespace TS_PART2;
partition values ORDER_BOOK_PART3 less (TO_DATE (January 1, 2009 ',' DD-MM-YYYY "")) tablespace TS_PART3;
partition values ORDER_BOOK_PART4 less (TO_DATE (1 January 2012 ',' DD-MM-YYYY "")) tablespace TS_PART4;
partition values ORDER_BOOK_PART5 less (TO_DATE (1 January 2015 ',' DD-MM-YYYY "")) tablespace TS_PART5;
partition values ORDER_BOOK_PART6 less (TO_DATE (1 January 2018 ',' DD-MM-YYYY "")) tablespace TS_PART6
)
;
create index ORDER_BOOK_IDX on ORDER_BOOK (PRODUCT_ID, CASHFLOW_DATE);





Now, I did the following steps to change the existing partitions to the new partitions composite range-hash:

Start
DBMS_REDEFINITION. CAN_REDEF_TABLE
(uname = > 'DEMO_TEST',)
tNom = > "ORDER_BOOK"
options_flag = > DBMS_REDEFINITION. CONS_USE_PK);
end;
/


create the table INTERIM_ORDER_BOOK
(
CUST_ID NUMBER (10),
PROFILE_ID NUMBER (10),
PRODUCT_ID NUMBER (10),
SUB_PROFILE_ID VARCHAR2 (25).
DATE OF CASHFLOW_DATE,
NUMBER (24.6) OF EARNINGS.
constraint INTERIM_ORDER_BOOK_PK primary key (CUST_ID, PROFILE_ID, PRODUCT_ID, SUB_PROFILE_ID, CASHFLOW_DATE)
)
partition of range (CASHFLOW_DATE)
SUBPARTITION by hash (CUST_ID)
model SUBPARTITION
(
SUBPARTITION SP1 tablespace TS_PART1,
SUBPARTITION SP2 tablespace TS_PART2,
SUBPARTITION SP3 tablespace TS_PART3,
SUBPARTITION SP4 tablespace TS_PART4,
SUBPARTITION SP5 tablespace TS_PART5,
SUBPARTITION SP6 tablespace TS_PART6
)
(values less than P1 (to_date('01-01-2003','DD-MM-YYYY')) partition,
values of partition P2 lower (to_date('01-01-2006','DD-MM-YYYY')),
values of partition P3 lower (to_date('01-01-2009','DD-MM-YYYY')),
partition P4 values less than (to_date('01-01-2012','DD-MM-YYYY')),
values for partition P5 lower (to_date('01-01-2015','DD-MM-YYYY')),
values of partition P6 lower (to_date('01-01-2018','DD-MM-YYYY')))
allow the movement of the line;


Start
dbms_redifinition.start_redef_table
(uname = > 'DEMO_TEST',)
orig_table = > 'ORDER_BOOK ',.
int_table = > 'INTERIM_ORDER_BOOK ',.
options_flag = > DBMS_REDEFINITION. CONS_USE_PK);
end;
/


Start
DBMS_REDEFINITION.finish_redef_table
(uname = > 'DEMO_TEST',)
orig_table = > 'ORDER_BOOK ',.
int_table = > 'INTERIM_ORDER_BOOK');
end;
/




After I did the index with the LOCAL clause is to say local indexes.

But the problem is that... at the beginning when there is only the range partitioning, then the data will tablespaces corresponding score.

But after editing the table, fill the array results in consumption of space in partition as well as the default tablespace storage.
I checked the size of the storage space. Since I came to know about it.

The output of the USER_TAB_SUBPARTITIONS is correct... each subparts are in the corresponding storage spaces.

But the primary partitions (USER_TAB_PARTITION) are in the default tablespace.



Please help me... thanks in advance...

Published by: user12780416 on April 13, 2012 07:46

>
But the primary partitions (USER_TAB_PARTITION) are in the default tablespace.
>
Yes - so why is it a surprise?

You have created a new table and storage for partitions has not specified then the default tablespace has been used. You did not specify tablespaces for subparts to each of them uses the specified tablespace.

Don't you see the difference between the original

partition ORDER_BOOK_PART1 values less than (TO_DATE('01-01-2003', 'DD-MM-YYYY')) tablespace TS_PART1,

and the new

(partition P1 values less than (to_date('01-01-2003','DD-MM-YYYY')),

Tags: Database

Similar Questions

  • Doubt of external Table

    Hi Master,

    Using Sql * Loader I can load the dat/csv/txt data to oracle tables. I can use it when clause contained in the data file and load control in different tables.

    e.g. when deptno = 20 then table 1. Where deptno = 10 then table2 etc...

    But using the external table... How can I load data in different tables as an example above? I googled. but do not get appropriate information. Please advise... !!

    Concerning

    AR

    Bad code. You use positional WHEN when you define variable length fields. As a result, your code will load Department 201, 2090,...:

    SQL > create table T_DEPTNO_20)

    NUMBER 2 DEPTNO,

    3 DNAME VARCHAR2 (14).

    LOC 4 VARCHAR2 (13)

    5)

    6 EXTERNAL ORGANIZATION

    () 7

    ORACLE_LOADER TYPE 8

    9 DEFAULT TEMP DIRECTORY

    10 ACCESS SETTINGS

    (11)

    12 RECORDS DELIMITED BY NEWLINE

    13 CHARGE WHEN (1:2) = "20"

    14 LOGFILE 'MyFile.log.

    15 BADFILE "MyFile.bad."

    16 NODISCARDFILE

    17 FIELDS TERMINATED BY ', '.

    18 EVENTUALLY FRAMED BY "" "

    RTRIM 19

    20 MISSING FIELD VALUES ARE NULL

    (21)

    22 DEPTNO,

    23 DNAME,

    LOC 24

    25)

    26)

    27 RENTAL ("MyFile.csv")

    28)

    RELEASE 29 UNLIMITED LIMIT

    30.

    Table created.

    SQL > select * from T_DEPTNO_20

    2.

    DEPTNO DNAME LOC

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

    SEARCH 20 DALLAS

    201 DO NOT LOAD ARMPIT

    SQL > drop table T_DEPTNO_20

    2.

    Deleted table.

    SQL > create table T_DEPTNO_20)

    NUMBER 2 DEPTNO,

    3 DNAME VARCHAR2 (14).

    LOC 4 VARCHAR2 (13)

    5)

    6 EXTERNAL ORGANIZATION

    () 7

    ORACLE_LOADER TYPE 8

    9 DEFAULT TEMP DIRECTORY

    10 ACCESS SETTINGS

    (11)

    12 RECORDS DELIMITED BY NEWLINE

    13 CHARGER WHEN deptno = '20'

    14 LOGFILE 'MyFile.log.

    15 BADFILE "MyFile.bad."

    16 NODISCARDFILE

    17 FIELDS TERMINATED BY ', '.

    18 EVENTUALLY FRAMED BY "" "

    RTRIM 19

    20 MISSING FIELD VALUES ARE NULL

    (21)

    22 DEPTNO,

    23 DNAME,

    LOC 24

    25)

    26)

    27 RENTAL ("MyFile.csv")

    28)

    RELEASE 29 UNLIMITED LIMIT

    30.

    Table created.

    SQL > select * from T_DEPTNO_20

    2.

    DEPTNO DNAME LOC

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

    SEARCH 20 DALLAS

    SQL >

    SY.

  • doubt on FLASHBACK TABLE

    Dear members,
    I do FLASHBACK TABLE as the user sys. I know that the FLASHBACK TABLE cannot be used for the SYS user.
    always I have run this command with clouse to file and
    When I run this command with timestamp clouse, I get error.
    Can you get it someone please tell me why this is happening?
    ORACLE: 11 GR 2
    OS: FEDORA 14
    -----
    $ sqlplus / as sysdba
    SQL > insert into values t11 ('k');

    1 line of creation.

    SQL >! day;
    Sea 30 mai 15:45: 13 IST 2012

    SQL > insert into values t11 ('z');

    1 line of creation.

    SQL > drop table t11.

    Deleted table.

    SQL > select * from dba_recyclebin;

    OWNER OBJECT_NAME ORIGINAL_NAME OPERATION TYPE TS_NAME CREATETIME DROPTIME DROPSCN NOM_PARTITION RELATED BASE_OBJECT PURGE_OBJECT SPACE CANCAN
    ------------------------------ ------------------------------ -------------------------------- --------- ------------------------- ------------------------------ ------------------- ------------------- ---------- -------------------------------- --- --- ---------- ----------- ------------ ----------
    SYS, BIN$ wT5v1Gw96zbgQGSsOaoM4g == $0 T11 DROP TABLE NISHANT 2012-05 - 30:14:47:37 2012-05 - 30:15:45:36 17728226 YES YES 85115 85115 85115 8

    SQL > flashback table "BIN$ wT5v1Gw96zbgQGSsOaoM4g == $0 ' timestamp to_time (May 30, 2012 15:45:13 ',' dd/mm/yyyy hh24:mi:ss');
    flashback table "BIN$ wT5v1Gw96zbgQGSsOaoM4g == $0" to to_time timestamp (May 30, 2012 15:45:13 ',' dd/mm/yyyy hh24:mi:ss')
    *
    ERROR on line 1:
    ORA-08185: Flashback not supported for user SYS


    SQL > flashback table "BIN$ wT5v1Gw96zbgQGSsOaoM4g == $0" before dropping.

    Flashback complete.

    before drop between recyclebin area (* flashback drop option *)

    trying to flashback with data undo timestamp (* flashback table option *), is not supported for sys.

    and the table created in the non-system tablespace

    ----------
    SYS, BIN$ wT5v1Gw96zbgQGSsOaoM4g == $0 T11 DROP TABLE NISHANT 2012-05 - 30:14:47:37 2012-05 - 30:15:45:36 17728226 YES YES 85115 85115 85115 8

    independent system LMT TBS will support recyclebin functionality

    Published by: rash on May 30, 2012 18:07

  • Doubt PLSQL cursor table variable record

    Hi all

    My version of Oracle: Oracle 10 G

    I have a cursor, allows day:

    cursor c_emp
    is
    (select * from emp where empina = 10); -Now this * returns me 5 values, IE empid (100), (rahul) fname, lname (smith), sal (9000), deptid (10)

    Now, in my home, I have a cursor loop for example, like this:

    Start
    for rec_c_emp in c_emp
    loop
    ..
    ..
    ..
    end of loop
    end;

    Now my requirement is I need to capture these values(rec_c_emp.empid,rec_c_emp.fname,rec_c_emp.lname,rec_c_emp.sal,rec_c_emp.deptid) 5
    in a table that is to say i [0], I [1], I [2], I [3], I [4]

    Now please note that in the future my ' select * from emp' could make me more values and so I need to capture these values without changing my code.

    I hope that I clearly explained my problem, please help.

    Concerning
    Rahul

    Mac_Freak_Rahul wrote:

    Let's say I have a cursor:

    cursor c_emp is
    Select to_char (empid) empid, fname to_char (fname), lname to_char (lname), to_char (sal) sal to_char (deptid) deptid from emp where empno = 100;

    want these values to be assigned to my table of varchar2, as:
    a [0]: 100
    [1]: rahul
    [2]: smith
    [3]: 9000
    [4]: 10

    Possible - but not really reasonable.

    The projection of SQL itself must be a single table. For example

    SQL> create or replace type TArray is table of varchar2(4000);
      2  /
    
    Type created.
    
    SQL>
    SQL> col ARRAY format a50
    SQL> select TArray(empno,ename,job,sal) as ARRAY from emp order by empno;
    
    ARRAY
    --------------------------------------------------
    TARRAY('7369', 'SMITH', 'CLERK', '800')
    TARRAY('7499', 'ALLEN', 'SALESMAN', '1600')
    TARRAY('7521', 'WARD', 'SALESMAN', '1250')
    TARRAY('7566', 'JONES', 'MANAGER', '2975')
    TARRAY('7654', 'MARTIN', 'SALESMAN', '1250')
    TARRAY('7698', 'BLAKE', 'MANAGER', '2850')
    TARRAY('7782', 'CLARK', 'MANAGER', '2450')
    TARRAY('7788', 'SCOTT', 'ANALYST', '3000')
    TARRAY('7839', 'KING', 'PRESIDENT', '5000')
    TARRAY('7844', 'TURNER', 'SALESMAN', '1500')
    TARRAY('7876', 'ADAMS', 'CLERK', '1100')
    TARRAY('7900', 'JAMES', 'CLERK', '950')
    TARRAY('7902', 'FORD', 'ANALYST', '3000')
    TARRAY('7934', 'MILLER', 'CLERK', '1300')
    
    14 rows selected.
    
    SQL>
    SQL> begin
      2          for c in(
      3                  select TArray(empno,ename,job,sal) as array from emp where rownum < 3
      4          ) loop
      5                  DBMS_OUTPUT.put_line( 'ROW' );
      6                  for i in 1..c.Array.Count loop
      7                          DBMS_OUTPUT.put_line( 'array['||i||']='||c.Array(i) );
      8                  end loop;
      9          end loop;
     10  end;
     11  /
    ROW
    array[1]=7369
    array[2]=SMITH
    array[3]=CLERK
    array[4]=800
    ROW
    array[1]=7499
    array[2]=ALLEN
    array[3]=SALESMAN
    array[4]=1600
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • Doubt regarding accessible Table via DB link

    I have the following SQL code:

    Select * from tab1@db_link tab1, tab2
    where tab1.col1 = tab2.col2
    and tab1.col2 = 99;

    Can I make sure that Oracle provides data for:
    Select * from tab1 tab1@db_link
    where tab1 = 99;
    and then joined the data with tab2.

    What could be the most fast way to access the data in this way? Basically, I need to resolve a similar application.

    No not much difference. On both cases, oracle goes for the same plan. Here is a small test case

    select t.*
      from t@to_inlabnew t, t1
     where t.object_id = t1.object_id
       and t.object_type = 'TABLE'
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.03       0.16          0          0          1           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      171      1.09       1.68          0          6          0        2544
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total      173      1.12       1.84          0          6          1        2544
    
    Rows     Execution Plan
    -------  ---------------------------------------------------
          0  SELECT STATEMENT   GOAL: ALL_ROWS
       2544   HASH JOIN
       1000    INDEX   GOAL: ANALYZED (FAST FULL SCAN) OF 'T1_IDX' (INDEX)
     199792    REMOTE OF 'T' (REMOTE)
                   [TO_INLABNEW.REGRESS.RDBMS.DEV.US.ORACLE.COM]
                  SELECT "OWNER","OBJECT_NAME","SUBOBJECT_NAME","OBJECT_ID",
                  "DATA_OBJECT_ID","OBJECT_TYPE","CREATED","LAST_DDL_TIME",
                  "TIMESTAMP","STATUS","TEMPORARY","GENERATED","SECONDARY" FROM
                    "T" "T" WHERE "OBJECT_TYPE"='TABLE'
    
    select t.*
      from (select * from t@to_inlabnew where object_type = 'TABLE') t, t1
     where t.object_id = t1.object_id
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      171      1.09       1.46          0          6          0        2544
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total      173      1.09       1.46          0          6          0        2544
    
    Rows     Execution Plan
    -------  ---------------------------------------------------
          0  SELECT STATEMENT   GOAL: ALL_ROWS
       2544   HASH JOIN
       1000    INDEX   GOAL: ANALYZED (FAST FULL SCAN) OF 'T1_IDX' (INDEX)
     199792    REMOTE OF 'T' (REMOTE)
                   [TO_INLABNEW.REGRESS.RDBMS.DEV.US.ORACLE.COM]
                  SELECT "OWNER","OBJECT_NAME","SUBOBJECT_NAME","OBJECT_ID",
                  "DATA_OBJECT_ID","OBJECT_TYPE","CREATED","LAST_DDL_TIME",
                  "TIMESTAMP","STATUS","TEMPORARY","GENERATED","SECONDARY" FROM
                    "T" "T" WHERE "OBJECT_TYPE"='TABLE'
    
  • Find the right Partition for swap Partiton when there are PARTITION and SUBPARTITION

    Hi all

    I have a small problem:

    I want to find the right cause of partitions of the partition key.  I have a partition and a Subpartition (sample - table in annex).

    I leave the database to generate the partition (and name), the name is generated. I need to find for the exchange of partition

    the right of Partition has cause of a given value of the partition key (in this case EVOD_PART_DATE and 20141101 value).

    When I try to find the right partiton name, I would use generally not:

    SELECT DISTINCT dbms_rowid.rowid_object(ROWID) data_object_id
       FROM F_CONTRACT_EVENT
       WHERE  EVOD_PART_DATE = TO_DATE ('20141101','YYYYMMDD')
    

    Okay, I get 2 rows, I'm expecting one, but cause the result are the subpartions, I get this:

      SELECT *  FROM ALL_OBJECTS WHERE DATA_OBJECT_ID IN ( 155159,155154);
    

    I see:

    EVO_DM    F_CONTRACT_EVENT    SYS_SUBP4292    155159    155159    TABLE SUBPARTITION
    EVO_DM    F_CONTRACT_EVENT    SYS_SUBP4287    155154    155154    TABLE SUBPARTITION
    

    But I don't want the subparts, I want the PARTITON!

    The table:

    CREATE TABLE "EVO_DM"."A0_F_CONTRACT_EVENT" 
       ( "EVOD_DDATE_ID_VALID_FROM" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDATE_ID_VALID_TO" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DTIME_ID_START" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DSUST_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCHAN_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DARTI_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCAMP_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DUSAG_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOPSY_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDEVI_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DSHOP_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DPLFO_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DACCO_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDECL_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOBJT_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOFFR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCNTR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCURR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCONT_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DIVWC_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "DD_SUBSCRIPTION_ID" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "SINGLE_ISSUE" NUMBER(8,0) DEFAULT 0, 
        "SUBSCRIPTION" NUMBER(8,0) DEFAULT 0, 
        "RENEWAL" NUMBER(8,0) DEFAULT 0, 
        "CONVERSION" NUMBER(8,0) DEFAULT 0, 
        "DOWNLOAD" NUMBER(8,0) DEFAULT 0, 
        "UPDATES" NUMBER(8,0) DEFAULT 0, 
        "NET_VALUE_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "GROSS_VALUE_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "COMMISSION_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "TAX_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "POSITION_NR" NUMBER(3,0) DEFAULT -1, 
        "DD_ORDER_NR" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "EVOD_SOURCE_CD" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "FLAG_STOCK_RELEVANT" NUMBER(1,0) DEFAULT '0' NOT NULL ENABLE, 
        "RENEWAL_NR" NUMBER(3,0) DEFAULT -1, 
        "EVOD_DDATE_ID_SUBSCRIPTION" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DPRCG_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
      
       EVOD_PART_DATE DATE  GENERATED ALWAYS AS ( TRUNC(TO_DATE(TO_CHAR(EVOD_DDATE_ID_VALID_FROM),'YYYYMMDD'),'MM')) VIRTUAL)
    PARTITION BY RANGE(EVOD_PART_DATE)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
    SUBPARTITION BY LIST(EVOD_SOURCE_CD)
    SUBPARTITION TEMPLATE(
    SUBPARTITION "P_ITUNES"  VALUES ('ITUNES') ,
    SUBPARTITION    "P_WSP"  VALUES ('WSP'),
    SUBPARTITION   "P_GOOGLE"  VALUES ('PLAYSTORE'),
    SUBPARTITION   "P_DEFAULT"  VALUES ('~') ,
    SUBPARTITION   "P_AMAZON"  VALUES ('AMAZON_EREADER', 'AMAZON_MANUELL', 'AMAZON_TABLET') ,
    SUBPARTITION    "P_MSD"  VALUES ('MSD')
    )
    (
     PARTITION P01 VALUES LESS THAN (TO_DATE('200310','YYYYMM')) SEGMENT CREATION DEFERRED
    )
    PARALLEL 10  ;
    

    Any ideas?

    Thanks for Berlin

    First of all - the DOF you posted is INVALID - you do not specify a delayed segment creation for partitions. Specify you for the table.

    Also, you must remove the DEFAULT value - 1 for the partitioning column. The value '-1' cannot be converted to a valid date for the virtual partitioning column value.» The default value is useless and will give confusion around the year exception err when the exception should actually provide a NULL value for a column not null.

    The documentation explains how to use the EXCHANGE PARTITION and has the code example

    Maintenance of Partitions

    Exchange a Partition of a partitioned Table interval

    You can exchange of range partitions in a partitioned table interval. However, you must make sure that the partition of the interval was created before that you can swap partition. You can leave the database create the partition in the partition of the interval of locking.

    The following example shows an Exchange partition for the interval_sales table, range-partitioned using the monthly from partitions of 1 January 2004. This example shows how to add data to the table using charge Exchange partition for June 2007. Assume there is only a local index on the interval_sales table and equivalent index have been created on the interval_sales_june_2007 table.

    LOCK TABLE interval_sales  PARTITION FOR (TO_DATE('01-JUN-2007','dd-MON-yyyy'))  IN SHARE MODE;    ALTER TABLE interval_sales  EXCHANGE PARTITION FOR (TO_DATE('01-JUN-2007','dd-MON-yyyy'))  WITH TABLE interval_sales_jun_2007  INCLUDING INDEXES;
    

    Note the use of the FOR syntax to identify a partition that has been generated by the system. The name of the partition can be used by querying the *_TAB_PARTITIONS view of data dictionary to find the partition system-generated name.

    Given that the last paragraph? That's what showed Solomon.

    NOTE:-special attention to the FIRST paragraph. If you use segment carried OVER creating the partition you want to Exchange could NOT have been created yet.

    Make SURE that you lock the partition as the example shows, or you will get an exception if it has not been created.

    Also - we know NOT what PROBLEM you're trying to solve.

    If you exchange a PARTITION of a table subpartitioned your working table should actually be partitioned using the SAME parttioning as the subparts in the source table:

    See my response in this thread:

    https://forums.Oracle.com/forums/thread.jspa?threadID=2482090&TSTART=30

    In this thread I have provide the code example illustrating how the table should be created and made Exchange.

  • How to change the default attributes for an index for a subpartition without data in it

    Hello

    The use of oracle 11.2.0.3 attributes and modifydefault for a partition, for example the tablespace can but can not use the same syntax for a subpartition.

    Is it possible to change the default attributes for a subpartition?

    ALTER index RTRN_CUR_CONV_IDX change the default attributes for the subpartition SYS_SUBP64934 RTRN_PART_201505 tablespace

    Thank you

    Refer to the section of the doc "a Subpartition template editing.

    http://docs.Oracle.com/CD/B28359_01/server.111/b32024/part_admin.htm#i1007904

    A Subpartition template editing

    You can change a model of a composite partitioned table subpartition by replacing it with a new model of subpartition. All subsequent operations that use the subpartition template (such as ADD PARTITION or MERGE PARTITIONS ) will now use the new subpartition template. Existing subpartitions remain unchanged.

    If you change a subpartition of a range model * composite partitioned table, then of range partitions that have not yet been created will use the new subpartition template.

    Use of the ALTER TABLE ... SET SUBPARTITION TEMPLATE statement to specify a new subpartition template. For example:

    You will need to 'fix' the new model as in the doc example.

    By the example of partitions with just a line in them, we find the secondary partition with data correctly a tablespace name as expecetd, but 4 other secondary partitions always show the name of the default tablespace in user_ind_subpartitions.

    Any idea whay and if can change

    Change the template affects only the created NEW partitions/subpartitions. If you want existing subpartitions to a different tablespace, you will need to move it.

  • Segments subpartions seems to also be moved when table sub-parts are moved

    Hello

    I have the script that dynamically generates the code to move subpartitions to one tablespace to another:

    Select
    'alter table ' | p.TABLE_OWNER | '.' || p.table_name | "move subpartition ' | p.subpartition_name | "tablespace LOCAL2_D;" text
    Of
    dba_tab_subpartitions p
    where
    p.tablespace_name in ('LOCAL1_D', 'LOCAL1_I');

    The generated code is as follows:

    ALTER table OBD_OWN. DWH_PREMIES move subpartition DWH_PRE_RLP_2010_Q1_1891 LOCAL2_D tablespace;

    Yet, when one do a check against the segments with this script:

    Select
    owner of s.Owner,
    type of s.segment_type,
    Count (*) rest_segs
    Of
    s dba_segments
    where
    s.tablespace_name in ('LOCAL1_D', 'LOCAL1_I')
    Group
    s.Owner,
    s.segment_type
    order by
    1, 2, 3;

    I see a reduction in the amount of the subpartitions table, which is an expected result, but also a decrease in the index sub-parts:

    -To time 1:

    OWNER TYPE REST_SEGS
    -------------------- ------------------------------ ---------
    OBD_OWN 30 INDEX
    OBD_OWN INDEX 16 180 PARTITION
    OBD_OWN INDEX SUBPARTITION 8 161
    PARTITION TABLE OBD_OWN 695
    OBD_OWN TABLE SUBPARTITION 593

    -By 2:

    OWNER TYPE REST_SEGS
    -------------------- ------------------------------ ---------
    OBD_OWN 30 INDEX
    OBD_OWN INDEX 16 180 PARTITION
    OBD_OWN INDEX SUBPARTITION 7 874 < = decrease in the unexpalined of these segments of type?
    PARTITION TABLE OBD_OWN 695
    OBD_OWN TABLE SUBPARTITION 586 < = decrease expected of segments in the tablespace crossing

    When you MOVE a Table Partition / SubPartition, the corresponding Index Partition/SubPartition becomes UNUSABLE.

    In 11.2, the Segment for a UNUSABLE Index/Partition/SubPartition is actually diminished - it restores the behavior "deferred_segment_creation".

    The segment is created when you run the ALTER INDEX REBUILD PARTITION indexname | Partition SUBPARTTION | SUBPARTITION name.

    Hemant K Collette

  • Shrink a subpartition

    Hello

    I have a RDBMS Oracle 11 GR 2.
    I get the following message of error when I try to "shrink" a subpartition:

    SQL > alter table OBD_OWN. DWH_DECLARATIES change the compact shrink subpartition DWH_DCE_RLP_2007_Q2_379 spacing.
    ALTER table OBD_OWN. DWH_DECLARATIES change the compact shrink subpartition DWH_DCE_RLP_2007_Q2_379 spacing
    *
    ERROR on line 1:
    ORA-10635: Type of invalid segment or tablespace


    and

    SQL > select TABLE_OWNER, TABLE_NAME, nom_partition, SUBPARTITION_NAME from dba_tab_subpartitions where SUBPARTITION_NAME

    TABLE_OWNER, TABLE_NAME NOM_PARTITION SUBPARTITION_NAME
    ------------------------------ ------------------------------ ------------------------------ -----------------------------
    OBD_OWN DWH_DECLARATIES DWH_DCE_RLP_2007_Q2 DWH_DCE_RLP_2007_Q2_379


    Can someone tell me how to 'shrink' a table subpartition?

    Thanks and greetings

    Hello

    The syntax is correct.  Please check if the tablespace is with management manual of the space segment.

    Kind regards

    Bigot

  • There is 'table' for the object_type values?

    I wonder if there is a system view, or a table for all the values that can appear in the all_objects.object_type column? Or maybe the only way to get this list of os values to query with the distinct keyword dba_objects.object_type?

    Thank you

    Look at the source of the view:

    Decode (o.type #, 0, 'NEXT ITEM', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTERS',)

    4, 'VIEW', 5, 'SYNONYM', 6, 'ORDER ',.

    7, 'PROCEDURE', 'FUNCTION', 8, 9, 'PACKAGE ',.

    11, 'PACKAGE BODY', 12, 'TRIGGER ',.

    13, 'TYPE', 14, 'TYPE BODY ':

    19, "PARTITION TABLE", 20, 'PARTITION OF THE INDEX', 21, 'CRAFT. "

    22, 'LIBRARY', 23, "DIRECTORY," 24, "QUEUE."

    28, 'JAVA SOURCE,' 29, 'JAVA CLASS', 30, 'JAVA RESOURCE. "

    32, "INDEXTYPE", 33, "OPERATOR",.

    34, 'TABLE SUBPARTITION', 35, "INDEX SUBPARTITION.

    40, 'LOB PARTITION', 41, "LOB SUBPARTITION.

    42, NVL ((SELECT "EQUIVALENCE OF REWRITING"

    AMOUNT $ s

    WHERE s.obj #= o.obj #.

    and bitand (s.xpflags, 8388608) = 8388608).

    "MATERIALIZED VIEW'),

    43, "DIMENSION."

    44, 'CONTEXT', 46, "SET OF RULES', 47, 'PLAN OF RESOURCES."

    48, GROUP "CONSUMER."

    55, "XML SCHEMA", 56, "JAVA DATA."

    57, 'EDITION', 59, "RULE."

    60, "CAPTURE," 61, "APPLICABLE."

    62, 'EVALUATION CONTEXT ',.

    66, 'JOB', 'PROGRAMME', 67, 68, "JOB CLASS", 69, 'WINDOW',

    72, GROUP 'PLANNER', 74, 'CALENDAR', 79 'CHAIN ',.

    81, 'GROUP OF FILES', 82 'MODEL OF EXPLORATION' 87, "ASSEMBLY,"

    90, 'IDENTIFICATION', ' 92, 'CUBE DIMENSION', 93, "CUBE."

    94, "MEASUREMENT RECORD", 95 "CUBE BUILD PROCESS,"

    100, "LINE WATCHER", 101, "DESTINATION."

    "UNDEFINED"),

  • Subpartition compresses with pctfree

    Hello

    How compress subpartition on exadata, by using "high motion" and pctfree 10 options?

    I used this statement, but I get only ORA-14160: this physical attribute may not be specified for a table subpartition.

    ALTER table table_name move subpartition subpartition_name PCTFREE 10 compress to request high;

    Published by: user837363 on 2012-11-12 05:14

    The document is on My Oracle Support

    https://support.Oracle.com/epmos/faces/UI/km/SearchDocDisplay.JSPX?ID=258597.1&type=document&DisplayIndex=1

    The short version is: you cannot specify physical attributes such as compression for an individual subpartition. You will have to do for the whole score (or even the entire table).

    Marc

  • Using PARTITION FOR / SUBPARTITION FOR the syntax to insert

    We try to use PARTITION syntax for (or, better, SUBPARTITION of syntax) to insert into a table subpartitioned.
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/sql_elements009.htm#i165979
    08:26:46 GM_CS_CDR@oradev02> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    5 rows selected.
    This table is interval partitions DATA_ORIGIN_ID and list subpartitions on TABLE_NAME.

    First of all, an insert in base without specifying the partitions:
    08:10:05 GM_CS_CDR@oradev02> insert into key_ids2 (
    08:11:51   2  DATA_ORIGIN_ID         ,
    08:11:51   3  TABLE_NAME             ,
    08:11:51   4  DUR_UK                 ,
    08:11:51   5  DUR_UK_ID              )
    08:11:51   6  select
    08:11:51   7  12         ,
    08:11:51   8  TABLE_NAME             ,
    08:11:51   9  DUR_UK                 ,
    08:11:51  10  DUR_UK_ID              
    08:11:51  11  from key_ids where table_name = 'PART' 
    08:11:51  12  and rownum <= 10;
    
    10 rows created.
    Check SUBPARTITION to a SELECT statement syntax:
    08:19:43 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> 
    08:26:45 GM_CS_CDR@oradev02> select count(*) from key_ids2 
    08:26:45   2  subpartition for(12,'PART');
    
      COUNT(*)
    ----------
            10
    
    1 row selected.
    But if we add a subpartition specification (to limit the locking to a single subpartition), we get a syntax error:
    08:14:57 GM_CS_CDR@oradev02> insert into key_ids2 subpartition for(12,'PART') (
    08:14:57   2  DATA_ORIGIN_ID         ,
    08:14:57   3  TABLE_NAME             ,
    08:14:57   4  DUR_UK                 ,
    08:14:57   5  DUR_UK_ID              )
    08:14:57   6  select
    08:14:57   7  14         ,
    08:14:57   8  TABLE_NAME             ,
    08:14:57   9  DUR_UK||'!'                 ,
    08:14:57  10  DUR_UK_ID              
    08:14:57  11  from key_ids 
    08:14:57  12  where table_name = 'PART' 
    08:14:57  13  and rownum <= 10;
    insert into key_ids2 subpartition for(12,'PART') (
                                         *
    ERROR at line 1:
    ORA-14173: illegal subpartition-extended table name syntax
    Specify the partition level did not work either:
    08:14:58 GM_CS_CDR@oradev02> insert into key_ids2 partition for(14) (
    08:15:23   2  DATA_ORIGIN_ID         ,
    08:15:23   3  TABLE_NAME             ,
    08:15:23   4  DUR_UK                 ,
    08:15:23   5  DUR_UK_ID              )
    08:15:23   6  select
    08:15:23   7  14         ,
    08:15:23   8  TABLE_NAME             ,
    08:15:23   9  DUR_UK||'!'                 ,
    08:15:23  10  DUR_UK_ID              
    08:15:23  11  from key_ids 
    08:15:23  12  where table_name = 'PART' 
    08:15:23  13  and rownum <= 10;
    insert into key_ids2 partition for(14) (
                                      *
    ERROR at line 1:
    ORA-14108: illegal partition-extended table name syntax
    But by specifying explicit partition and subpartition works:
    08:17:45 GM_CS_CDR@oradev02> insert into key_ids2 partition (SYS_P15127) (
    08:18:23   2  DATA_ORIGIN_ID         ,
    08:18:23   3  TABLE_NAME             ,
    08:18:23   4  DUR_UK                 ,
    08:18:23   5  DUR_UK_ID              )
    08:18:23   6  select
    08:18:23   7  12         ,
    08:18:23   8  TABLE_NAME             ,
    08:18:23   9  DUR_UK||'!'                 ,
    08:18:23  10  DUR_UK_ID              
    08:18:23  11  from key_ids 
    08:18:23  12  where table_name = 'PART' 
    08:18:23  13  and rownum <= 10;
    
    10 rows created.
    
    08:18:24 GM_CS_CDR@oradev02> insert into key_ids2 subpartition (SYS_SUBP15126) (
    08:19:42   2  DATA_ORIGIN_ID         ,
    08:19:42   3  TABLE_NAME             ,
    08:19:42   4  DUR_UK                 ,
    08:19:42   5  DUR_UK_ID              )
    08:19:42   6  select
    08:19:42   7  12         ,
    08:19:42   8  TABLE_NAME             ,
    08:19:42   9  DUR_UK||'!#'                 ,
    08:19:42  10  DUR_UK_ID              
    08:19:42  11  from key_ids 
    08:19:42  12  where table_name = 'PART' 
    08:19:42  13  and rownum <= 10;
    
    10 rows created.
    We have succeeded by using the syntax of PARTITION for tables partitioned, but not sous-partitionnee.

    Any ideas?

    Thank you
    Mike

    Support of Oracle reproduced this issue. The resolution was to ensure cursor_sharing is set to "EXACT", we happened to use "SIMILAR" in this case due to a migration of 10 g and 11 g.

    Please visit 1481564.1 for more information.

  • SUBPARTITION templates

    How can I copy templates subpartition of a table to another table in the physical model of OSDM?

    I need to create a relatively large number of subpartition templates and I have to do for several tables. They have all of the similar subpartitions.
    Can I create templates for subpartition to a table and copy and paste those to the other tables?
    Otherwise, there is no alternative workaround to avoid creating for each table subpartition templates?

    I use v3.1EA3

    Hello

    The expression of the interval you specified,

    1)
    (VALUES LESS THAN (1) PARTITION

    is not a valid interval expression.

    You must set the Expression of the interval 1.

    If you want to generate the PARTITION VALUES LESS THAN clause (1), you should add a Partition for the Table object in the physical model and set its property to list the value to 1.

    David

    Published by: David last on 19 January 2012 10:58

  • MV for replication. No PK in the source table and the LOB column

    I would like to replicate tables between 2 instances in 2 different hosts. Mixed 11 GR 1 material and Oracle 10 g 2. I have my doubts:

    1. some tables from the source is not PK, and I understand that MV with rowid is not supported. Is there no workaround known workaround on this case without changing the structure of the source table? Full/complete update is acceptable.

    2 one of the table has the CLOB data type. Can I just ignore this column in MV? A known issue with this kind of approach?

    #1. You must use WITH ROWID MV and I believe it is supported up to the latest version, unless you can find any document, please give me the code of Notes.
    #2. CLOB column is supported in MV, so no need to jump.

  • Bug in Array Function XNodes 1.4.0.24?

    Hello

    I have been using Array Function XNodes 1.4.0.24 for a while now and find it quite useful.

    However, I have met unexpected behavior which makes me doubt the filter table node (and so the whole package).

    The matrix of results 'False elements' of the node is too large, filled with identical nonsensical data after the apparently correct data elements.

    The amount of padding data depends on the array of Boolean.

    My input array is U8. Its size seems to be the problem. If it is less of a factor of 100 the vi will work as expected.

    Anyone who has installed the package can check this behavior with the vi attached?

    The package can be downloaded here:

    http://lavag.org/files/file/58-array-function-XNodes/

    Best regards

    Florian

    The CR of LAVA is a support for each download. You should ask it there - http://lavag.org/topic/10303-cr-array-function-xnodes/

Maybe you are looking for

  • Satellite C660 - cannot download and run the new driver LAN

    Help! I'm going along in circles. TEMPRO tells me I need a new wireless lan driver. I download what I think, it's good. So it's just sitting there like a file in my documents. I know you're all probably laugh at my ignorance, but what I do? I tried t

  • speed control of video in labview

    Hi all I want to build an application where I want to play a video in LabVIEW want to control its speed. For Eg: When I increase the speed of the video needs to move more quickly, while if I reduce the speed of that video must be slow down. I am able

  • How to move to windows 10?

    Currently, I have vista OS and I was wondering what I need to do to achieve 10 victory? Thanks :)

  • When I go to my home page all trembles

    Now when I go to my home page, everything is shakeing.  I tried to expand it upwards and printing is great but when I go to play my games photos. are so small that I'm not good enough to play.  At the beginning he said correct my settings but I don't

  • Lenovo 3000 N500 graphics card problem!

    Hi all! I have a problem with my laptop newly purchased, about the graphics card. This is supposed to be an nVidia GeForce 9300 M. Above all, I bought this laptop to play World of Warcraft on the subject, if that means something to you. My problem is