Corrupted Sub partitions

Oracle v8.1.6.3
The table has 36 major partitions with 32 subs in each part. When we attempt to analyze a specific partition (P2003_05)in a table with 32 sub-partitions, we receive a ORA-3113 error. We know that this is a bogus error because we can analyze all the other partitions and sub-partitions without incident. This is the second time we have had a partition that will need to be exported, truncated and imported before it can be analyzed. I have absolutely no idea what causes this. Any ideas?

This forum is for posting feedback about the OTN site.
The best place for your question is probably a Database forum, perhaps the General Database Discussions forum.

Similar Messages

  • Sub Partitioning does not have considerable impact Explain Plan

    Hi Guys,
    I have a table that is list - list sub partitioned on Oracle 11g - 11.2.0.3.
    The first partition is on the CIRCLE_ID column and the second sub partition is on the LOAD_DTTM.
    Now i have tried 2 queries on the database
    1 - select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM a1
    where A1.CIRCLE_ID ='AK'
    AND a1.LOAD_DTTM BETWEEN '28-MAR-2012' AND '03-APR-2012';
    2 - select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM a1
    where A1.CIRCLE_ID ='AK'
    AND to_char(a1.LOAD_DTTM) like '%MAR%'
    Ideally the 2nd query should take a much higher time than the first query.
    But the explain plan shows a difference of less than 1%.
    Can you pls provide some insights as why Oracle is not understanding that subpartitioning will be faster?
    Thanks,
    Manish

    Hi Dom
    Thanks for your reply.
    Is the first query using partition pruning? - Yes
    Have you gathered stats, etc, etc? - No. All our queries always need to access the entire table and not a particular subset and the where criteria always uses partition and sub partition columns. so we dont see the need to collect stats. Can you pls advise what stats need to be collected and what will be the advantage of those?
    Below are the output of the Explain Plan and Trace Output -
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> show parameter optimizer;
    NAME TYPE VALUE
    optimizer_capture_sql_plan_baselines boolean FALSE
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 11.2.0.3
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    optimizer_use_invisible_indexes boolean FALSE
    optimizer_use_pending_statistics boolean FALSE
    optimizer_use_sql_plan_baselines boolean TRUE
    SQL> show parameter db_file_multi;
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 128
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL> column sname format a20
    SQL> column pname foramt 20
    SP2-0158: unknown COLUMN option "foramt"
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL> select
    2 sname
    3 , pname
    4 , pval1
    5 ,pval2
    6 from sys.aux_stats$;
    from sys.aux_stats$
    ERROR at line 6:
    ORA-00942: table or view does not exist
    SQL> explain plan for
    select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM_NEW a1
    where A1.CIRCLE_ID ='KA'
    AND a1.LOAD_DTTM BETWEEN '28-MAR-2012' AND '03-APR-2012'
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3032220315
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)
    | Time | Pstart| Pstop |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 41M| 1643M| 548M(100)
    |999:59:59 | | |
    | 1 | PARTITION LIST SINGLE | | 41M| 1643M| 548M(100)
    |999:59:59 | KEY | KEY |
    | 2 | PARTITION LIST ITERATOR| | 41M| 1643M| 548M(100)
    |999:59:59 | KEY | KEY |
    | 3 | TABLE ACCESS FULL | GSM_PRR_SUM_NEW | 41M| 1643M| 548M(100)
    |999:59:59 | KEY | KEY |
    PLAN_TABLE_OUTPUT
    Note
    - dynamic sampling used for this statement (level=2)
    14 rows selected.
    SQL> explain plan for
    select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM_NEW a1
    where A1.CIRCLE_ID ='KA'
    AND to_char(a1.LOAD_DTTM) like '%MAR%';
    2 3 4
    Explained.
    SQL> SQL> SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    Plan hash value: 189546713
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| T
    ime | Pstart| Pstop |
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 62M| 2521M| 5435M(100)|99
    9:59:59 | | |
    | 1 | PARTITION LIST SINGLE| | 62M| 2521M| 5435M(100)|99
    9:59:59 | KEY | KEY |
    | 2 | PARTITION LIST ALL | | 62M| 2521M| 5435M(100)|99
    9:59:59 | 1 | 305 |
    |* 3 | TABLE ACCESS FULL | GSM_PRR_SUM_NEW | 62M| 2521M| 5435M(100)|99
    9:59:59 | KEY | KEY |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    3 - filter(TO_CHAR(INTERNAL_FUNCTION("A1"."LOAD_DTTM")) LIKE '%MAR%')
    Note
    PLAN_TABLE_OUTPUT
    - dynamic sampling used for this statement (level=2)
    19 rows selected.
    SQL>
    SQL> SET AUTOTRACE TRACEONLY ARRAYSIZE 100
    SQL> select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM_NEW a1
    where A1.CIRCLE_ID ='KA'
    AND a1.LOAD_DTTM BETWEEN '28-MAR-2012' AND '03-APR-2012' 2 3 ;
    49637012 rows selected.
    Execution Plan
    Plan hash value: 3032220315
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)
    | Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 41M| 1643M| 546M(100)
    |999:59:59 | | |
    | 1 | PARTITION LIST SINGLE | | 41M| 1643M| 546M(100)
    |999:59:59 | KEY | KEY |
    | 2 | PARTITION LIST ITERATOR| | 41M| 1643M| 546M(100)
    |999:59:59 | KEY | KEY |
    | 3 | TABLE ACCESS FULL | GSM_PRR_SUM_NEW | 41M| 1643M| 546M(100)
    |999:59:59 | KEY | KEY |
    Note
    - dynamic sampling used for this statement (level=2)
    Statistics
    0 recursive calls
    7 db block gets
    530220 consistent gets
    33636 physical reads
    0 redo size
    644311477 bytes sent via SQL*Net to client
    5460594 bytes received via SQL*Net from client
    496372 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    49637012 rows processed
    SQL> SET AUTOTRACE TRACEONLY ARRAYSIZE 100
    SQL> select MOBILENUMBER, CLOSING_BAL from GSM_PRR_SUM_NEW a1
    where A1.CIRCLE_ID ='KA'
    AND to_char(a1.LOAD_DTTM) like '%MAR%' 2 3
    4 ;
    219166976 rows selected.
    Execution Plan
    Plan hash value: 189546713
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| T
    ime | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 228M| 9155M| 3552M(100)|99
    9:59:59 | | |
    | 1 | PARTITION LIST SINGLE| | 228M| 9155M| 3552M(100)|99
    9:59:59 | KEY | KEY |
    | 2 | PARTITION LIST ALL | | 228M| 9155M| 3552M(100)|99
    9:59:59 | 1 | 274 |
    |* 3 | TABLE ACCESS FULL | GSM_PRR_SUM_NEW | 228M| 9155M| 3552M(100)|99
    9:59:59 | KEY | KEY |
    Predicate Information (identified by operation id):
    3 - filter(TO_CHAR(INTERNAL_FUNCTION("A1"."LOAD_DTTM")) LIKE '%MAR%')
    Note
    - dynamic sampling used for this statement (level=2)
    Statistics
    38 recursive calls
    107 db block gets
    2667792 consistent gets
    561765 physical reads
    0 redo size
    2841422984 bytes sent via SQL*Net to client
    24108883 bytes received via SQL*Net from client
    2191671 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    219166976 rows processed
    SQL>
    Thanks,
    Manish

  • Add sub partition on another column in oracle

    I have a table which has two partitions (by range): first_half and second_half based on a column "INSERT_DAY".
    I need to add subpartitions "SUCCESS" and "NONSUCCESS" based on the values of another column "STATUS" (subpartition by list) i.e. I need to transform my range partition to composite (range-list) partition.
    I do not wish to drop existing tables or partitions. What is the ALTER query for this?
    PS: The database is Oracle 9i

    Ok, my bad. The project is about charging GPRS customers for data usage.
    Here is the real DDL:
    CREATE TABLE CDR_EVENT_RCD_FILE_MOB_AGG
       (    "MOBILE_NO" VARCHAR2(16 BYTE),
        "DATA_VOLUME" NUMBER(*,0),
        "CHARGE" NUMBER(*,0),
        "RECORD_COUNT" NUMBER(*,0),
        "COUNTER" NUMBER(*,0) DEFAULT 0,
        "INSERT_DAY" NUMBER(*,0),
        "MAX_FILE_SEQ_NO" NUMBER(*,0),
        "MIN_FILE_SEQ_NO" NUMBER(*,0),
        "REQUEST_ID" VARCHAR2(21 BYTE),
        "TRANSACTION_ID" VARCHAR2(21 BYTE),
        "RESPONSE_TIME" TIMESTAMP (6),
        "RETURN_CODE" CHAR(2 BYTE),
        "FAILURE_REASON" VARCHAR2(1024 BYTE),
        "CHARGED_AMOUNT" NUMBER(*,2)
      PARTITION BY RANGE ("INSERT_DAY")
    (PARTITION "FIRST_HALF"  VALUES LESS THAN (16)  ,
    PARTITION "SECOND_HALF"  VALUES LESS THAN (MAXVALUE) ) ;
      CREATE INDEX "CDRDEVTBS"."MAX_FILE_SEQ_NO_INDEX" ON "CDRDEVTBS"."CDR_EVENT_RCD_FILE_MOB_AGG" ("MAX_FILE_SEQ_NO") ;
      CREATE INDEX "CDRDEVTBS"."MOBILE_NO_INDEX" ON "CDRDEVTBS"."CDR_EVENT_RCD_FILE_MOB_AGG" ("MOBILE_NO") ;
    As you can see, it is partitioned by range on "Insert_day".
    The requirement is to delete all the records having counter=3 (which means successful charging) for the records which are older than 15 days.
    So I thought, why not create sub partitions with counter so that final DDL would be something like the following. I would then avoid writing a DELETE query, which would take a lot of time to execute.
    CREATE TABLE CDR_EVENT_RCD_FILE_MOB_AGG (
        insert_day INT,
        counter INT,
    --other columns
    PARTITION BY RANGE (insert_day)
    SUBPARTITION BY LIST(counter)
    SUBPARTITION TEMPLATE
        SUBPARTITION SUCCESS VALUES(3),
        SUBPARTITION NONSUCCESS VALUES(DEFAULT)
        PARTITION first_half VALUES LESS THAN (16),
        PARTITION second_half VALUES LESS THAN (maxvalue)
    So that I could execute queries:
    alter table CDR_EVENT_RCD_FILE_MOB_AGG  truncate subpartition first_half_success; --execute on last day of every month
    alter table CDR_EVENT_RCD_FILE_MOB_AGG  truncate subpartition second_half_success; -- execute on 16th day of every month
    to remove unnecessary records.
    I would like to create subpartitions without dropping the existing table.

  • Any overhead with sub partitioning within a time based column?

    We have a table that's partitioned based on a weekly partition and it has records of Type A and records of Type B and there are processes that are only interested in records of Type B.
    Right now the table is partitioned as interval on the timestamp column as a weekly partitioning but I'm considering introducing sub partitioning into the mix based on these record Types.
    Is that feasible?

    >
    We have a table that's partitioned based on a weekly partition and it has records of Type A and records of Type B and there are processes that are only interested in records of Type B.
    >
    Whether to partition on the 'type' column depends on the data skew and how the type data is accessed.
    If the access and skew is such that an index would be used then just use an index - no need to partition. For example if only 5% of the data is Type B then you could probably use an index effectively for accessing only Type B data.
    For Type A data (95%) a full table scan will be used and Oracle will skip/ignore the 5% of the data this Type B so no partitioning is needed.
    Subpartitioning would be useful if an index won't help filter the data and you want Oracle to filter it automatically.
    You will need to either redefine the table (using DBMS_REDEFINITION) or recreate the table to if you want to add subpartitioning.

  • Can we addnew partition and sub partition in the existing table in one shor

    can we addnew partition and sub partition in the existing table in one short

    nav wrote:
    can we addnew partition and sub partition in the existing table in one shortYes,
    You can and below is the example for Range-List partition
    ALTER TABLE <table_name>
       ADD PARTITION <partition_name> VALUES LESS THAN (<value>
          STORAGE (INITIAL 20K NEXT 20K) TABLESPACE <TS name> NOLOGGING
              SUBPARTITION Clause
              SUBPARTITION Clause
              SUBPARTITION Clause
              SUBPARTITION Clause
               );

  • Create local spatial index on range sub-partitions?

    Is is possible to create a local spatial index on a table with range sub-partitions? We're trying to do this on a table that contains lots of x,y,z point data.
    Trying to do so gives me the error: ORA-29846: cannot create a local domain index on a composite partitioned tableAccording to the spatial documentation:The following restrictions apply to spatial index partitioning:
    - The partition key for spatial tables must be a scalar value, and must not be a spatial column.
    - Only range partitioning is supported on the underlying table. All other kinds of partitioning are not currently
    supported for partitioned spatial indexes.So there is nothing saying it can or can't be done. The examples I've seen in the documentation tend to partition based on a single value and don't use subpartitioning.
    Example of what we're trying to do:SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    SQL>
    SQL> --- Create a table, partioned by X and subpartitioned by Y
    SQL> CREATE TABLE sub_partition_test
      2  (
      3      x               NUMBER,
      4      y               NUMBER,
      5      z               NUMBER,
      6      geometry        MDSYS.SDO_GEOMETRY
      7  )
      8  PARTITION BY RANGE (x)
      9  SUBPARTITION BY RANGE (y)
    10     (
    11     PARTITION p_x100 VALUES LESS THAN (100)
    12     (
    13                     SUBPARTITION sp_x100_y100 VALUES LESS THAN (100),
    14                     SUBPARTITION sp_x100_y200 VALUES LESS THAN (200),
    15                     SUBPARTITION sp_x100_yMAXVALUE VALUES LESS THAN (MAXVALUE)
    16     ),
    17     PARTITION p_x200 VALUES LESS THAN (200)
    18     (
    19                     SUBPARTITION sp_x200_y100 VALUES LESS THAN (100),
    20                     SUBPARTITION sp_x200_y200 VALUES LESS THAN (200),
    21                     SUBPARTITION sp_x200_yMAXVALUE VALUES LESS THAN (MAXVALUE)
    22     ),
    23     PARTITION p_xMAXVALUE VALUES LESS THAN (MAXVALUE)
    24     (
    25                     SUBPARTITION sp_xMAXVALUE_y100 VALUES LESS THAN (100),
    26                     SUBPARTITION sp_xMAXVALUE_y200 VALUES LESS THAN (200),
    27                     SUBPARTITION sp_xMAXVALUE_yMAXVALUE VALUES LESS THAN (MAXVALUE)
    28     )
    29  );
    Table created.
    SQL>
    SQL> -- Insert some sample data
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (1, 1, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(1, 1, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (50, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(50, 150, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (150, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 150, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (150, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 250, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (150, 300, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 300, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (220, 210, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 210, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (220, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 150, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (220, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 250, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (220, 300, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 300, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (320, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 250, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (320, 160, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 160, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (320, 290, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 290, 50), NULL, NULL));
    1 row created.
    SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
      2  VALUES (320, 320, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 320, 50), NULL, NULL));
    1 row created.
    SQL>
    SQL> -- Create some metadata
    SQL> DELETE FROM user_sdo_geom_metadata WHERE TABLE_NAME = 'SUB_PARTITION_TEST';
    1 row deleted.
    SQL> INSERT INTO user_sdo_geom_metadata VALUES ('SUB_PARTITION_TEST','GEOMETRY',
      2  SDO_DIM_ARRAY(
      3     SDO_DIM_ELEMENT('X', 0, 1000, 0.005),
      4     SDO_DIM_ELEMENT('Y', 0, 1000, 0.005)
      5  ), 262152);
    1 row created.
    SQL>
    SQL> -- Create an Unusable Local Spatial Index
    SQL> CREATE INDEX sub_partition_test_spidx ON sub_partition_test (geometry)
      2    INDEXTYPE IS MDSYS.SPATIAL_INDEX
      3  LOCAL
      4  UNUSABLE;
    CREATE INDEX sub_partition_test_spidx ON sub_partition_test (geometry)
    ERROR at line 1:
    ORA-29846: cannot create a local domain index on a composite partitioned tableThanks,
    John

    Ok, thanks. That's what we're planning on doing now.
    SQL> CREATE TABLE partition_test
      2  (
      3      x               NUMBER,
      4      y               NUMBER,
      5      z               NUMBER,
      6      geometry        MDSYS.SDO_GEOMETRY
      7  )
      8  PARTITION BY RANGE (x, y)
      9     (
    10     PARTITION p_x100y100 VALUES LESS THAN (100, 100),
    11     PARTITION p_x100y200 VALUES LESS THAN (100, 200),
    12     PARTITION p_x100yMAX VALUES LESS THAN (100, MAXVALUE),
    13     PARTITION p_x200y100 VALUES LESS THAN (200, 100),
    14     PARTITION p_x200y200 VALUES LESS THAN (200, 200),
    15     PARTITION p_x200yMAX VALUES LESS THAN (200, MAXVALUE),
    16     PARTITION p_x300y100 VALUES LESS THAN (300, 100),
    17     PARTITION p_x300y200 VALUES LESS THAN (300, 200),
    18     PARTITION p_x300yMAX VALUES LESS THAN (MAXVALUE, MAXVALUE)
    19  );
    Table created.
    SQL>
    SQL> INSERT INTO user_sdo_geom_metadata VALUES ('PARTITION_TEST','GEOMETRY',
      2     SDO_DIM_ARRAY(
      3        SDO_DIM_ELEMENT('X', 0, 1000, 0.005),
      4        SDO_DIM_ELEMENT('Y', 0, 1000, 0.005)
      5     ), 262152);
    1 row created.
    SQL> CREATE INDEX partition_test_spidx ON partition_test (geometry)
      2     INDEXTYPE IS MDSYS.SPATIAL_INDEX
      3  LOCAL
      4  UNUSABLE;
    Index created.

  • Truncating sub partitions

    I am using oracle11g. I want to truncate subpartition on specific partion.
    I have partition on statewise. Each state partion has 7 day partition.
    For intance,
    Partion TX
    Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
    Partion CA
    Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
    Partion IA
    Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
    Now i want to perform following tasks.
    1. Need to truncate TUE sub partiion on TX partition.
    2. Need to truncate WED sub partiion on CA partition.
    3. Need to truncate SUN sub partiion on IA partition.
    How do we do this?
    The below statment truncate all TUE partition on all the partitions.
    ALTER TABLE TRX_TABLE
    TRUNCATE SUBPARTITION TUE;
    How do i tuncate specfic sub partition on specific partition?
    Any help is appreciated!!

    SQL> CREATE TABLE tbl(
      2                   state  VARCHAR2(2),
      3                   day    VARCHAR2(3)
      4                  )
      5     PARTITION BY LIST(state)
      6     SUBPARTITION BY LIST(day)
      7        SUBPARTITION TEMPLATE (
      8                               SUBPARTITION mon  VALUES('MON'),
      9                               SUBPARTITION tue  VALUES('TUE'),
    10                               SUBPARTITION wed  VALUES('WED'),
    11                               SUBPARTITION thu  VALUES('THU'),
    12                               SUBPARTITION fri  VALUES('FRI'),
    13                               SUBPARTITION sat  VALUES('SAT'),
    14                               SUBPARTITION sun  VALUES('SUN')
    15                              )
    16        (
    17         PARTITION tx VALUES('TX'),
    18         PARTITION ca VALUES('CA'),
    19         PARTITION ia VALUES('IA')
    20        )
    21  /
    Table created.
    SQL> select  table_name,
      2          partition_name,
      3          subpartition_name
      4    from  user_tab_subpartitions
      5    where table_name = 'TBL'
      6    order by partition_name,
      7             subpartition_name
      8  /
    TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
    TBL                            CA                             CA_FRI
    TBL                            CA                             CA_MON
    TBL                            CA                             CA_SAT
    TBL                            CA                             CA_SUN
    TBL                            CA                             CA_THU
    TBL                            CA                             CA_TUE
    TBL                            CA                             CA_WED
    TBL                            IA                             IA_FRI
    TBL                            IA                             IA_MON
    TBL                            IA                             IA_SAT
    TBL                            IA                             IA_SUN
    TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
    TBL                            IA                             IA_THU
    TBL                            IA                             IA_TUE
    TBL                            IA                             IA_WED
    TBL                            TX                             TX_FRI
    TBL                            TX                             TX_MON
    TBL                            TX                             TX_SAT
    TBL                            TX                             TX_SUN
    TBL                            TX                             TX_THU
    TBL                            TX                             TX_TUE
    TBL                            TX                             TX_WED
    21 rows selected.
    SQL> alter table tbl drop subpartition tx_mon
      2  /
    Table altered.
    SQL> select  table_name,
      2          partition_name,
      3          subpartition_name
      4    from  user_tab_subpartitions
      5    where table_name = 'TBL'
      6    order by partition_name,
      7             subpartition_name
      8  /
    TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
    TBL                            CA                             CA_FRI
    TBL                            CA                             CA_MON
    TBL                            CA                             CA_SAT
    TBL                            CA                             CA_SUN
    TBL                            CA                             CA_THU
    TBL                            CA                             CA_TUE
    TBL                            CA                             CA_WED
    TBL                            IA                             IA_FRI
    TBL                            IA                             IA_MON
    TBL                            IA                             IA_SAT
    TBL                            IA                             IA_SUN
    TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
    TBL                            IA                             IA_THU
    TBL                            IA                             IA_TUE
    TBL                            IA                             IA_WED
    TBL                            TX                             TX_FRI
    TBL                            TX                             TX_SAT
    TBL                            TX                             TX_SUN
    TBL                            TX                             TX_THU
    TBL                            TX                             TX_TUE
    TBL                            TX                             TX_WED
    20 rows selected.SY.

  • How will write SQL query to fetch data from  each Sub-partition..

    Hi All,
    Anyone does have any idea about How to write SQL query to fetch data from Sub-partition.
    Actually i have one table having composite paritition(Range+list)
    Now if i want to fetch data from main partition(Range) the query will be
    SELECT * FROM emp PARTITION(q1_2005);
    Now i want to fetch data at sub-partition level(List) .But i am not able to get any SQL query for that.
    Pls help me to sort out.
    Thanks in Advance.
    Anwar

    SELECT * FROM emp SUBPARTITION(sp1);

  • How to move partitions/sub-partitions into a different tablespace?

    Hi Uisng oracle 1..20.3 and have a range-hash partitioned table using interval partitioning - code below.
    Works fine just one problem.
    we wish to move the system geneerated partitions to different tablespaces later and also rename th epartitions.
    When try assign partition to a different tablespace get the folloiwng message
    alter table por_rt move partition SYS_P2283 tablespace bi_dw_data
    get message ora-14257 - cannot move partition other than range,list, system or hash partition.
    How can we avoid this.
    We we need to move all the subpartitions first?
    Tried this
    alter table move subpartition SYS_SUBP2269 tablespace bi_dw_data;
    but get message ora-01735 message invalid statement
    -- Create table
    create table POR_RT
      plant_issue_id    NUMBER not null,
      pf_run_num        NUMBER,
      partitioning_date DATE
    partition by range (PARTITIONING_DATE)
    subpartition by hash (PLANT_ISSUE_ID)
      partition PART_200912 values less than (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
        subpartition SYS_SUBP2261 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2262 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2263 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2264 tablespace BI_SUPPORT_DATA
      partition PART_201001 values less than (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
        subpartition SYS_SUBP2265 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2266 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2267 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2268 tablespace BI_SUPPORT_DATA
      partition SYS_P2273 values less than (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
        subpartition SYS_SUBP2269 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2270 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2271 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2272 tablespace BI_SUPPORT_DATA
      partition SYS_P2283 values less than (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
        subpartition SYS_SUBP2279 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2280 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2281 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2282 tablespace BI_SUPPORT_DATA
      partition SYS_P2278 values less than (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
        subpartition SYS_SUBP2274 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2275 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2276 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2277 tablespace BI_SUPPORT_DATA
    );Edited by: user5716448 on 22-Mar-2013 04:49

    you can not move composite parition directly you need to move subpartition using this statments
    alter table <tablename> move subpartition <sub partition name > tablespace <tablespace name>;
    than change partition tablespace using
    ALTER TABLE <table name> MODIFY DEFAULT ATTRIBUTES FOR PARTITION      <partition name> TABLESPACE <tablespace name>;

  • Can sub partitions be unbalanced?

    I have a fact table that is partitioned by day (YYYYMMD) and by data source (a 4-character code). The table receives about 200 million records daily - 150 comes from one data source and the rest (about 50 mn) comes from 8 data sources (2 mn avg from 4 sources, 8mn avg from 4 sources). The reason this is being thought is that data from the 8 data sources are being loaded in parallel and if any fail, the entire sub partition can be truncated and data reloaded.
    Is this the right partitioning strategy: composite partition - range (by day) and list subpartition (by data source), given that the sub-partitions will be very unbalanced?
    Thanks for your thoughts!
    Kit

    Unbalanced has no meaning within the context of RANGE-LIST composite partitioning.
    The records go where the partition template directs them.
    If you want all of your subpartitions to contain a roughly equal number of records use RANGE-HASH.

  • Corrupted Win7 Partition

    Can someone help me recover my corrupted Win7 partition please?
    Last login: Mon Jan 12 18:37:17 on console
    diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            502.0 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
       4:       Microsoft Basic Data                         497.3 GB   disk0s4
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *2.0 GB     disk1
       1:                 DOS_FAT_32 UNTITLED                2.0 GB     disk1s1
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                            GSP1RMCPRXFRER_EN_DVD  *3.3 GB     disk2
    diskutil cs list
    No CoreStorage logical volume groups found
    gpt show: /dev/disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168
    gpt show: /dev/disk0: Suspicious MBR at sector 0
    gpt show: /dev/disk0: Pri GPT at sector 1
    gpt show: /dev/disk0: Sec GPT at sector 1953525167
           start        size  index  contents
               0           1         MBR
               1           1         Pri GPT header
               2          32         Pri GPT table
              34           6        
              40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
          409640   980461752      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
       980871392     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
       982140928   971382784      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
      1953523712        1423        
      1953525135          32         Sec GPT table
      1953525167           1         Sec GPT header
    sudo fdisk /dev/disk0
    Disk: /dev/disk0    geometry: 121601/255/63 [1953525168 sectors]
    Signature: 0xAA55
             Starting       Ending
    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
    2: AF 1023 254  63 - 1023 254  63 [    409640 -  980461752] HFS+       
    3: AB 1023 254  63 - 1023 254  63 [ 980871392 -    1269536] Darwin Boot
    *4: 07 1023 254  63 - 1023 254  63 [ 982140928 -  971382784] HPFS/QNX/AUX

    Ok after an entire day it finally finished scanning:
    No disk found.
    TestDisk will try to restart itself using the sudo command to get
    root (superuser) privileges.
    sudo may ask your user password, it doesn't ask for the root password.
    Usually there is no echo or '*' displayed when you type your password.
    Password:
    TestDisk 7.0-WIP, Data Recovery Utility, December 2014
    Christophe GRENIER <[email protected]>
    http://www.cgsecurity.or
    TestDisk 7.0-WIP, Data Recovery Utility, December 2014
    Christophe GRENIER <[email protected]>
    http://www.cgsecurity.org
    Disk /dev/rdisk0 - 1000 GB / 931 GiB - 1953525168 sectors (RO)
    The harddisk (1000 GB / 931 GiB) seems too small! (< 8244231 TB / 7498084 TiB)
    Check the harddisk size: HD jumpers settings, BIOS detection...
    The following partitions can't be recovered:
         Partition               Start        End    Size in sectors
    >  MS Data                589197655 2408374607 1819176953
       MS Data                608449240 2427626192 1819176953
       Mac HFS                980871388 1961333139  980461752
       MS Data               1026846776 2846023728 1819176953
       Mac HFS               1278484238 1994314511  715830274
       Mac HFS               1364515067 4661906751 3297391685
       Mac HFS               1364900009 4762958318 3398058310
       Mac HFS               1365656154 2733684382 1368028229
       MS Data               1533864209 16102014586812747 16102013052948538 [tem: %s
       Mac HFS               1653462088 2056279113  402817026
    [ Continue ]
    NTFS, blocksize=4096, 931 GB / 867 GiB
    What is the next step now Loner T?

  • How to recover ge620 from recovery dvd with corrupted recovery partition

     i bought recently an ge620 and create recovery dvd with msi software (2 dvd)
    i want to repartition its 750 hdd with third party software and now recovery partition and the whole system have trouble and system not booting atall.
    the recovery partition is corrupted now and i have not the original win7 dvd especially product key to reinstal this x64 os .the drivers can be downloaded from oficial site.
    i try to recover laptop from revovery dvd(press f3 or f11 inserting dvd but  it read dvdrom and everything is ok until system try to read corrupted recovery partition and process fails )
    plz help me how can i recovery  this laptop with recovery dvd by FORCE the system to recover from dvd not recovery partition
    thank you

    See this FAQ:
    https://forum-en.msi.com/faq/article/how-to-recover-your-notebook
    Select 'Fail-safe' option to recover from DVD, this will wipe all existing partitions and restore the notebook as you purchased it (all data will be destroyed).

  • Data recovery from corrupt boot partition

    The boot partition on my MacBook running 10.7.6 has a corrupt volume structure and will not mount, much less boot. The recovery partition boots but really doesn't let me do anything. Disk Utility can't repair nor even complete verification. I have lots of images which I need to recover, so am looking for a utility which might help.
    Everything was apparently ok until the failure and the drive hardware checked out ok, so I'm hopeful my files are recoverable. A week or so ago I optimized the volume with TechTool Pro and the directory with DiskWarrior, and last night attempted to sync 1Password on my iPad with 1Password for Mac. This did no t work, probably because of my unfamiliarity with the procedure, but seemed to do no damage. When I ran TTPro last night from its eDrive partition it reported a volume structure problem on the partition which I started to fix with the program but then cancelled the analysis and decided to use disk utility instead. Disk utility also reported a problem but stopped the verification with the instruction to do a repair which it again could not complete. When I rebooted the system partition would again not boot but this time I got grey screen with a message that the debugger had loaded and <panic>. A message box said power down and restart, but that only repeats the process.
    I'm thinking of attempting to install a system on an external boot drive and accessing the corrupt partition with a data recovery utility. Any insights, ideas or shared experiences appreciated. Thanks in advance for any desperately needed help.

    The safest thing to do here is to install a new disk in the system and do a clean install of OS X. From there, you can put your corrupted volume in an external USB enclosure and mount the file system to try and recover as much data as you can.
    It's likely obvious now, but it's REALLY worth investing in a large-capacity external storage or Time Capsure to use with Time Machine. Backups are essential. Hardware always eventually dies. We all need an effective strategy to deal with that.
    A long time ago, I was backing my Linux system up to 4mm DAT. When the inevitable HDD crash came, I thought I was ready. Unfortunately, I hadn't tested recovery from tape and I ended up losing everything. Which is to say, until you know you can restore, you don't even have a backup. I lost thousands upon thousands of photos of my kids growing up.
    BTW, if it is essential that you recover as much as possible, consider taking the disk to a data recovery service. Be warned: It's expensive.

  • Hyper-V 2012 R2 generation 2 VM corrupted system partition after restart

    Hi
    We have a cluster running on Windows Server 2012 R2 with Hyper-V feature.
    One VM that has Windows 2012 R2 Standard OS installed (generation 2) was corrupted via restart.
    VM has 3 virtual disks (VHDX) - first for system (dynamic size), second for SQL_data (fixed size) , third for SQL_logs (fixed size)
    Yesterday, I restarted VM and VM didn't come up, I got error
    - 'Boot Failed. Windows Boot Manager'
    - 'Boot Failed. EFI SCSI Device'
    Looked all three VHDX we noticed that the first one (system) was corrupted - partition and MBR are gone inside VHDX.
    Second and third one are OK, we can mount them and access all data on it.
    It looks like on first VHDX (system with SQL 2014 installed) partition was corrupted, so we can't do repair because it's says unknown partition.
    There were no updates applied to VM, corrupted partition is 40GB size (dynamical) with 18GB of data used.
    This is first generation 2 VM that we have, all others are generation 1 without any problems.
    Can anyone please explain us, how can this happened, since we did nothing inside VM, also cluster reports no errors, checking VHDX looks fine, just partition inside got corrupted.
    We like to find out what happened, before we deploy more Win2012 R2 VM (gen2) in production envirionment.
    Thank you in advance 
    Regards
    Mike

    Hi Mike ,
     " The most common causes of data corruption in the VHD file are from:
    Data corruption due to faulty / failing physical storage
    Data corruption due to transferring files over faulty / failing networks
    Maybe the following link is helpful :
    http://blogs.technet.com/b/tonyso/archive/2011/12/06/how-to-fix-a-corrupted-hyper-v-vhd-file.aspx
    Hope it helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Keeps corrupting disk partition, even new disk

    After 6.5 reliable years, my Macbook Pro (mid-2007 model 3,1) failed to boot, just freezing at the white screen (in Mtn. Lion) even when the shift is held down for "safe boot". Although Disk Utility and Apple Hardware Test found nothing wrong with the hard drive, I replaced it along with the battery with brand new ones. Since then, no matter what OS X version I load (10.6.8, 10.8, Mavericks), the same problem occurs without warning after 2 or 3 weeks of normal use.
    Disk Warrior finds one or two damaged, seemingly non-crucial files each time, but their removal does not correct things. I partitioned the disk last time, and loaded Snow Leopard onto both so I would have a spare. Also fixed permissions. But sure enough, after a couple of weeks the partition most used is not openable while the other one still operates beautifully, no twirling beach balls or anything. But I know it's living on borrowed time.
    Can a logic board crap out after years pass and permanently corrupt a disk partition while leaving the rest intact? Could a failing PRAM battery do something like this?

    Could be that your new disk is also borked, but I would try getting a new SATA cable in the meantime.
    Good luck!

Maybe you are looking for