Doubt in partition and subpartition

hi gems...good afternoon...
I have a doubt redgarding partitioning and subpartitioning...This may be a silly question, but i am really not getting this...please help me..
I have a table which has Range-Hash composite partitioning.
The Range partitioning is on the default tablespace TS_PROD (because I didnt mention any tablespace name in the Range partitions).
The Hash subpartitioning are on the corresponding partition tablespaces (TS_PART1,TS_PART2,TS_PART3....TS_PART6).
I have created total 8 Range partitions and the number of Hash subpartitions are 6 for each of them.
Now when I query the DBA_TAB_PARTITIONS, then I got the desired output i.e. all the Range partitions are in the default tablespace.
When I query the DBA_TAB_SUBPARTITIONS, then also I got the desired output i.e. all the Hash subpartitions are in the separate partition tablespaces.
But when I have inserted data in that table, then I found that both the default tablespace and partition tablespaces are getting filled up.
Moreover, the sum of the increase in sizes of the partition tablespaces is equal to the increase in default tablespace.
I am not getting the concept of this. Where are the datas are getting stored??? In the default tablespace or in the partition tablespaces??
Thanks a lot in advance..

thanks a lot RP for your reply...
and sorry for the late and miscommunication...
Actually i am not so experienced in the DBA line and in my company suddenly my senior DBA left and i am the only one here...I got tensed... :( :(
I have started reading documentation of Oracle, have started the Administrator's Guide first...
Anyways...now i got the concept of the partitioning and subpartitioning i was doing...
The mistake which I was doing is: I was not mentioning the primary key index tablespace and that segment is going into the default tablespace and thats why the size was increasing for both default tablespace and partitioned tablespaces. Because of that fact I was getting confused again and again.
As soon as I mentioned the primary key index tablespace, the size of the default tablespace stopped increasing...
Now the script from which I am getting the size of the tablespaces: (join of dba_datafiles and dba_free_space)
select /* + RULE */ t.tablespace, t.totalspace as " Totalspace(MB)",
round((t.totalspace-fs.freespace),2) as "Used Space(MB)",
fs.freespace as "Freespace(MB)",
round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used",
round((fs.freespace/t.totalspace)*100,2) as "% Free"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t,
(select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace
order by t.tablespace;
Thanks a lot RP for your help... :)

Similar Messages

  • Where did the Partitions and SubPartitions go?

    I created a table with partition Range (Transaction_Date, Retention_Period) and hash (Record_Id) subpartition template (for 32 subpartitions)
    Then I add more partitions and while the loop is going on I can get counts of partitions and subpartitions. The job finished and my log table shows about 1800 partitions added and there should be 32 subpartitions for each of the partitions. However, user_tab_partitions shows zero records for the table, and user_tab_subpartitions also show zero record. After a few minutes the partitions show up but no subpartitions. The indexes on the table have also disappeared (one local and one global)
    Any explanation for this behaviour?
    Working on Exadata 11.2.0.3
    Querying
    USER_TABLES
    USER_TAB_PARTITIONS
    USER_TAB_SUBPARTITIONS
    USER_INDEXES

    >
    Step 1. Create Table xyz (c1 date, c2 integer c3 integer, etc)
    partition by range (c1,c2)
    subpartition template (s01, s02... s32)
    create index i1 on xyz (c1,c2,c3) local;
    Then, since I want to create about 1800 partitions I have a procedure that has a "loop around" ALTER TABLE add Partition .. until all the partitions are created. This is the "Job" which while running I query USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS to see how things are progressing. And Yes ALTER Table has no progressing to verify.
    So al the partitions get created. No errors from the procedure to go through creating all the partitions. So I would expect that at the end I should get to see all the new partitions for the Table. Instead I get "no records" from USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS.
    I am also aware that "ALTER TABLE ADD PARTITION .." cannot make indexes go away. However, if the query on USER_INDEXES returns nothing, what happend to the Index created before the partitions were added?
    I am not using DBMS_REDEFINITION. The only procedure is to add partitions one at a time for each date for 3 years. If you have a better way than a procedure please advise accordingly.
    >
    In order to help you the first step is to understand what problem you are dealing with. Then comes trying to determine what options are available for addressing the problem. There are too many times , and yours may, or may not, be another one, where people seem to have settled on a solution before they have really identified the problem.
    Anytime someone mentions the use of dynamic SQL it raises a red flag. And when that use is for DDL, rather than DMl, it raises a REALLY BIG red flag.
    Schema objects need to be managed properly and the DDL that creates them needs to be properly written and kept in some sort of version control.
    Scripts and procedures that use dynamic SQL are more properly used to create DDL, not to execute it. That is, rather than use a procedure to dynamically create or alter a table you would use the procedure to dynamically create a DDL script that would create or alter the table.
    Let's assume that you know for certain that your table really needs to have 1800 partitions, be subpartitioned the way you say and have partition and subpartitions names that you assign. Well, that would be a pain to hand-write 1800 partition definitions.
    So you would create a procedure that would produce a CREATE TABLE script that had the proper clauses and syntax to specify those 1800 partitions. Your 'loop' would not EXECUTE an ALTER TABLE for each partition but would create the partition specification and modify the partition boundaries for each iteration through the loop. Sort of like
    for i from 1 to 365 loop
        add partition spec for startDate + i
    end loop;The number of iterations would be a parameter and you would start with 2 or 3. Always test with the smallest code that will produce the correct results. If the code works for 3 days it will work for any larger reasonable number.
    Then you would save that script in your version control system and run it to create the table. There would be nothing to monitor since there is just one script and when it is done it is done.
    That would be a proper use of dynamic sql: to produce DDL, not to execute it.
    Back to your issue. If I were your manager then based on what you posted I would expect you to already have
    1. a requirements document that stated the problem (e.g. performance, data management) that was being addressed
    2. test results that showed that your proposed solution (a table partitioned the way you posted) solves the problem
    The requirements doc would have detail about what the performance/management issues are and what impact they are having
    You also need to document what the possible solutions are, the relative merits of each solution and the factors you considered when ranking the solutions. That is, why is your particular partitioning scheme the best solution for the problem.
    You should have test results that show the execution plans and performance you achieved by using a test version of your proposed table and indexes.
    Until you have 'proven' that your solution will work as you expect I wouldn't recommend implementing the full-blown version of it.
    1. Create a table MANUALLY that has 2 or three days worth of partitions.
    2. Load those partitions with a representative amount of data
    3. Execute test queries to query data from one of those partitions
    4. Execute the same test queries against your current table
    5. Capture the execution plans (the actual ones) for those queries. Verify that you are getting the performance improvements that you expected.
    Once ALL of that prep work is done and you have concluded that your table/index design is correct then go back to work on writing a script/procedure that will produce (not execute) DDL to produce the main table and partitioning you designed.
    Just an aside on what you posted. The indexes should be created AFTER the table and its partitions are created. If you are creating your local index first, as you post suggests, you are forcing Oracle to revamp it 1800 times when each partition is added. Just create the index after the table.
    p.s. the number of posts anyone has is irrevelant. The only thing that matters is whether the advice or suggestions they provide is helpful. And the helpfullness of those is limited to, and based on, ONLY the information a poster provides. For exampe, your proposed partitioning scheme might be perfectly appropriate for your use case or it could be totally inappropriate. We have no way of knowing without knowing WHY you chose that scheme.
    But I haven't seen one like that so it makes me suspicious that you really need to get that complicated.

  • Required alter script for adding partition and subpartition

    Hi Folks,
    Please help me to write ALTER STATEMENT for adding new partition P1 and SUBPARTITION P1_201001 and P1_201002.
    Thank you
    TABLE
    =======
    CREATE TABLE TEST
         "REPORT_ID"    NUMBER,
        "MONTH_ID"      NUMBER,
        "GROUP_ID"      NUMBER,
        "AGE_GROUP_ID"  NUMBER,
        "GENDER_CD"     CHAR(1 BYTE),
    PCTFREE 0 PCTUSED 0 INITRANS 1 MAXTRANS 255 COMPRESS BASIC NOLOGGING STORAGE
        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
      TABLESPACE "USER_WORK" PARTITION BY RANGE
        "REPORT_ID"
      SUBPARTITION BY LIST
        "MONTH_ID"
      SUBPARTITION TEMPLATE
        SUBPARTITION "M201212" VALUES
          201212
        TABLESPACE "USER_WORK"
    (PARTITION "P3" VALUES LESS THAN (4) PCTFREE 0 PCTUSED 0 INITRANS 1 MAXTRANS 255 STORAGE( BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USER_WORK" COMPRESS BASIC NOLOGGING ( SUBPARTITION "P3_M201212" VALUES
          201212
        TABLESPACE "USER_WORK" COMPRESS BASIC, SUBPARTITION "P3_M201301" VALUES
          201301
        TABLESPACE "USER_WORK" COMPRESS BASIC )
    );

    First modify the subpartition template
    ALTER TABLE TEST set
      SUBPARTITION TEMPLATE
        SUBPARTITION "M201212" VALUES
          201212
        SUBPARTITION P1_201001 VALUES (201001),
        SUBPARTITION P1_201002 VALUES (201002)
      )Then if the new partition is HIGHER than ALL existing ranges you can just add it
    alter table test add
    PARTITION "P1" VALUES LESS THAN (5) If the new partition is LOWER than one onf the existing ranges you will need to SPLIT the existing partition.
    alter table test SPLIT PARTITION "P3" AT (2)
    INTO (PARTITION P1, PARTITION P3)See the sections in the VLDB and Partitioning Guide
    Modifying a Subpartition Template
    http://docs.oracle.com/cd/E11882_01/server.112/e25523/part_admin002.htm#i1007904
    Splitting a Partition of a Range-Partitioned Table
    http://docs.oracle.com/cd/E11882_01/server.112/e25523/part_admin002.htm#i1008028

  • List-range partition and subpartition

    Does anyone know that Oracle 10g support partition by list and subpartition by range? Thanks.

    check the documentation link [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b31695/dialogs.htm#sthref441]
    hope you will find your answer on link page.

  • Re-org oracle 11.1.0.7 partitioned and sub partitioned index not validiting

    Hi,
    As part of maintenance i did the following thing on the oracle 11.1.0.7 on windows (no archive log mode);
         Re-orgnaized the tables in application- data tablespace - done
         Re-orgnaized large table in SYSAUX tablespace - only one table (alter table sys.WRI$_OPTSTAT_HISTGRM_HISTORY move tablespace sysaux
    alter index sys.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST rebuild nologging;
    alter index sys.I_WRI$_OPTSTAT_H_ST rebuild nologging;)
         Re-built the indexes on applicaton index tbs- done
         Re-built the partition indexes on application index tbs - done
         rebuilding of indexes in SYSAUX - done since it was invalid
         Run the analyze job –
         Re-claim the space at database level and OS level
    but i have the issues of partitioned and subpartition indexes are not validating..how to validate the indexes i am using the below querires but:
    ORA-14287: cannot REBUILD a partition of a Composite Range partitioned i

    i am using the below sqls:
    set head off
    set linesize 200
    select 'alter index '||index_owner||'.'||index_name||' rebuild partition '||partition_name||' ; ' from dba_ind_partitions where status <> 'VALID' and index_owner not in ('SYS','SYSTEM')
    set head off
    set linesize 200
    select 'alter index '||index_owner||'.'||index_name||' rebuild subpartition '||subpartition_name||' ;'
    from dba_ind_subpartitions
    where status <> 'VALID'

  • Gathering statistics on partitioned and non-partitioned tables

    Hi all,
    My DB is 11.1
    I find that gathering statistics on partitioned tables are really slow.
    TABLE_NAME                       NUM_ROWS     BLOCKS SAMPLE_SIZE LAST_ANALYZED PARTITIONED COMPRESSION
    O_FCT_BP1                        112123170     843140    11212317 8/30/2011 3:5            NO                    DISABLED
    LEON_123456                      112096060     521984    11209606 8/30/2011 4:2           NO                   ENABLED
    O_FCT                           115170000     486556      115170 8/29/2011 6:3            YES        
    SQL> SELECT COUNT(*)  FROM user_tab_subpartitions
      2  WHERE table_name =O_FCT'
      3  ;
      COUNT(*)
           112I used the following script:
    BEGIN
      DBMS_STATS.GATHER_TABLE_STATS(ownname          => user,
                                    tabname          => O_FCT',
                                    method_opt       => 'for all columns size auto',
                                    degree           => 4,
                                    estimate_percent =>10,
                                    granularity      => 'ALL',
                                    cascade          => false);
    END;
    /It costs 2 mins for the first two tables to gather the statistics respectively, but more than 10 mins for the partitioned table.
    The time of collecting statistics accounts for a large part of total batch time.
    And most jobs of the batch are full load in which case all partitions and subpartitions will be affected and we can't just gather specified partitions.
    Does anyone have some experiences on this subject? Thank you very much.
    Best regards,
    Leon
    Edited by: user12064076 on Aug 30, 2011 1:45 AM

    Hi Leon
    Why don't you gather stats at partition level? If your partitions data is not going to change after a day (date range partition for ex), you can simply do at partition level
    GRANULARITY=>'PARTITION' for partition level and
    GRANULARITY=>'SUBPARTITION' for subpartition level
    You are gathering global stats every time which you may not require.
    Edited by: user12035575 on 30-Aug-2011 01:50

  • Using PARTITION FOR/SUBPARTITION FOR syntax to insert

    We are trying to use PARTITION FOR syntax (or, better, SUBPARTITION FOR syntax) to insert into a subpartitioned table.
    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 has interval partitions on DATA_ORIGIN_ID and list subpartitions on TABLE_NAME.
    First, a basic insert without specifying 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.Verifying SUBPARTITION FOR syntax on a SELECT:
    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 when we add a subpartition specification (to limit the lock 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 syntaxSpecifying at 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 syntaxBut specifying explicit partition and subpartition does work:
    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 been successful in using the PARTITION FOR syntax for tables that were partitioned but not subpartitioned.
    Any ideas?
    Thanks,
    Mike

    I've created a simplified script to reproduce our issue. The use of the syntax on an INSERT INTO using VALUES still produces the same error.
    Thanks,
    Andy
    select * from v$version;
    create table part_test_tbl
      data_origin_id NUMBER  not null,
      table_name VARCHAR2(30) not null,
      dur_uk     VARCHAR2(250) not null,
      dur_uk_id  NUMBER
    partition by range (data_origin_id) INTERVAL (1)
    subpartition by list (TABLE_NAME)
    SUBPARTITION TEMPLATE(
      subpartition BLUE values ('BLUE'),
      subpartition RED values ('RED'),
      subpartition YELLOW values ('YELLOW'),
      subpartition GREEN values ('GREEN'),
      subpartition ORANGE values ('ORANGE')
    (PARTITION DFLT_INTRVL VALUES LESS THAN (0)
      subpartition BLUE values ('BLUE'),
      subpartition RED values ('RED'),
      subpartition YELLOW values ('YELLOW'),
      subpartition GREEN values ('GREEN'),
      subpartition ORANGE values ('ORANGE')
    -- Create/Recreate indexes
    create index PART_TEST_TBL_PK on PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      compress 2  local;
    create unique index PART_TEST_TBL_UK on PART_TEST_TBL (TABLE_NAME, DUR_UK_ID)
      compress 1;
    -- Create/Recreate primary, unique and foreign key constraints
    alter table PART_TEST_TBL
      add constraint PART_TEST_TBL_PK primary key (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK) USING INDEX PART_TEST_TBL_PK;
    alter table PART_TEST_TBL
      add constraint PART_TEST_TBL_UK unique (TABLE_NAME, DUR_UK_ID) USING INDEX PART_TEST_TBL_UK;
    --Add test data
    BEGIN
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'BLUE', '1', 1);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'BLUE', '2', 2);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'YELLOW', '3', 3);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'GREEN', '4', 4);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'ORANGE', '5', 5);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'BLUE', '6', 6);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'BLUE', '7', 7);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'YELLOW', '8', 8);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'GREEN', '9', 9);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'ORANGE', '10', 10);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'BLUE', '11', 11);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'BLUE', '12', 12);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'YELLOW', '13', 13);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'GREEN', '14', 14);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'ORANGE', '15', 15);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'BLUE', '16', 16);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'BLUE', '17', 17);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'YELLOW', '18', 18);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'GREEN', '19', 19);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'ORANGE', '20', 20);
       COMMIT;
    END;
    --Validate the subpartition_extended syntax
    select count(*) from PART_TEST_TBL subpartition for(10,'BLUE');
    --Show subpartition_extended syntax does not work on INSERT INTO
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    VALUES
    (10
    ,'BLUE'
    ,'16!'
    ,1016);
    --Show subpartition_extended syntax does not work on INSERT INTO
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    SELECT ptt.data_origin_id
          ,ptt.table_name
          ,ptt.dur_uk || '!' dur_uk
          ,ptt.dur_uk_id + 1000 dur_uk_id
      FROM PART_TEST_TBL ptt
    WHERE ptt.table_name = 'BLUE'
       AND ptt.data_origin_id = 10;
    DROP TABLE part_test_tbl PURGE;-----
    SQL> 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
    SQL> create table part_test_tbl
      2  (
      3    data_origin_id NUMBER  not null,
      4    table_name VARCHAR2(30) not null,
      5    dur_uk     VARCHAR2(250) not null,
      6    dur_uk_id  NUMBER
      7  )
      8  partition by range (data_origin_id) INTERVAL (1)
      9  subpartition by list (TABLE_NAME)
    10  SUBPARTITION TEMPLATE(
    11    subpartition BLUE values ('BLUE'),
    12    subpartition RED values ('RED'),
    13    subpartition YELLOW values ('YELLOW'),
    14    subpartition GREEN values ('GREEN'),
    15    subpartition ORANGE values ('ORANGE')
    16  )
    17  (PARTITION DFLT_INTRVL VALUES LESS THAN (0)
    18    (
    19    subpartition BLUE values ('BLUE'),
    20    subpartition RED values ('RED'),
    21    subpartition YELLOW values ('YELLOW'),
    22    subpartition GREEN values ('GREEN'),
    23    subpartition ORANGE values ('ORANGE')
    24    )
    25  );
    Table created
    SQL> -- Create/Recreate indexes
    SQL> create index PART_TEST_TBL_PK on PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      2    compress 2  local;
    Index created
    SQL> create unique index PART_TEST_TBL_UK on PART_TEST_TBL (TABLE_NAME, DUR_UK_ID)
      2    compress 1;
    Index created
    SQL> -- Create/Recreate primary, unique and foreign key constraints
    SQL> alter table PART_TEST_TBL
      2    add constraint PART_TEST_TBL_PK primary key (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK) USING INDEX PART_TEST_TBL_PK;
    Table altered
    SQL> alter table PART_TEST_TBL
      2    add constraint PART_TEST_TBL_UK unique (TABLE_NAME, DUR_UK_ID) USING INDEX PART_TEST_TBL_UK;
    Table altered
    SQL> --Add test data
    SQL> BEGIN
      2 
      3     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      4     values (0, 'BLUE', '1', 1);
      5 
      6     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      7     values (0, 'BLUE', '2', 2);
      8 
      9     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    10     values (0, 'YELLOW', '3', 3);
    11 
    12     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    13     values (0, 'GREEN', '4', 4);
    14 
    15     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    16     values (0, 'ORANGE', '5', 5);
    17 
    18     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    19     values (1, 'BLUE', '6', 6);
    20 
    21     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    22     values (1, 'BLUE', '7', 7);
    23 
    24     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    25     values (1, 'YELLOW', '8', 8);
    26 
    27     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    28     values (1, 'GREEN', '9', 9);
    29 
    30     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    31     values (1, 'ORANGE', '10', 10);
    32 
    33     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    34     values (2, 'BLUE', '11', 11);
    35 
    36     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    37     values (2, 'BLUE', '12', 12);
    38 
    39     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    40     values (2, 'YELLOW', '13', 13);
    41 
    42     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    43     values (2, 'GREEN', '14', 14);
    44 
    45     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    46     values (2, 'ORANGE', '15', 15);
    47 
    48     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    49     values (10, 'BLUE', '16', 16);
    50 
    51     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    52     values (10, 'BLUE', '17', 17);
    53 
    54     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    55     values (10, 'YELLOW', '18', 18);
    56 
    57     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    58     values (10, 'GREEN', '19', 19);
    59 
    60     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    61     values (10, 'ORANGE', '20', 20);
    62 
    63     COMMIT;
    64  END;
    65  /
    PL/SQL procedure successfully completed
    SQL> --Validate the subpartition_extended syntax
    SQL> select count(*) from PART_TEST_TBL subpartition for(10,'BLUE');
      COUNT(*)
             2
    SQL> --Show subpartition_extended syntax does not work on INSERT INTO
    SQL> INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
      2  (data_origin_id
      3  ,table_name
      4  ,dur_uk
      5  ,dur_uk_id)
      6  VALUES
      7  (10
      8  ,'BLUE'
      9  ,'16!'
    10  ,1016);
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    VALUES
    (10
    ,'BLUE'
    ,'16!'
    ,1016)
    ORA-14173: illegal subpartition-extended table name syntax
    SQL> --Show subpartition_extended syntax does not work on INSERT INTO
    SQL> INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
      2  (data_origin_id
      3  ,table_name
      4  ,dur_uk
      5  ,dur_uk_id)
      6  SELECT ptt.data_origin_id
      7        ,ptt.table_name
      8        ,ptt.dur_uk || '!' dur_uk
      9        ,ptt.dur_uk_id + 1000 dur_uk_id
    10    FROM PART_TEST_TBL ptt
    11   WHERE ptt.table_name = 'BLUE'
    12     AND ptt.data_origin_id = 10;
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    SELECT ptt.data_origin_id
          ,ptt.table_name
          ,ptt.dur_uk || '!' dur_uk
          ,ptt.dur_uk_id + 1000 dur_uk_id
      FROM PART_TEST_TBL ptt
    WHERE ptt.table_name = 'BLUE'
       AND ptt.data_origin_id = 10
    ORA-14173: illegal subpartition-extended table name syntax
    SQL> DROP TABLE part_test_tbl PURGE;
    Table dropped
    SQL>

  • Modify HUGE HASH partition table to RANGE partition and HASH subpartition

    I have a table with 130,000,000 rows hash partitioned as below
    ----RANGE PARTITION--
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)(
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009),
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010),
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011),
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE)
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR, LINE_ID);
    Data: -
    INSERT INTO TEST_PART
    VALUES ('2000',200001,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200009,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200010,'CM');
    VALUES ('2006',NULL,'CM');
    COMMIT;
    Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
    How do I change the current partition of the table from HASH partition to RANGE partition and a sub-partition (HASH) without losing the data and existing indexes?
    The table after restructuring should look like the one below
    COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)
    SUBPARTITION BY HASH (C_NBR) (
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Pls advice
    Thanks in advance

    Sorry for the confusion in the first part where I had given a RANGE PARTITION instead of HASH partition. Pls read as follows;
    I have a table with 130,000,000 rows hash partitioned as below
    ----HASH PARTITION--
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY HASH (C_NBR)
    PARTITIONS 2
    STORE IN (PCRD_MBR_MR_02, PCRD_MBR_MR_01);
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Data: -
    INSERT INTO TEST_PART
    VALUES ('2000',200001,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200009,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200010,'CM');
    VALUES ('2006',NULL,'CM');
    COMMIT;
    Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
    How do I change the current partition of the table from hash partition to range partition and a sub-partition (hash) without losing the data and existing indexes?
    The table after restructuring should look like the one below
    COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)
    SUBPARTITION BY HASH (C_NBR) (
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Pls advice
    Thanks in advance

  • How I tried fix my partitions and restore a Dell Diagnostic Partition.

    UPDATED: 2 September 2012
    UPDATE: Now that I reflect back on the incidence, I realize that the Dell Utility partition had lost its ability to boot long before I had messed up my partition table. But I realized it only when I was testing all my partitions after fixing the partition table. But as I have already written this long post, lets just keep it here for future reference of anyone else stumbling across a similar problem. Read on to know about my experience.
    RECOMMENDATION: I do not recommend trying out all the steps below as they did not completely solve the problem for me. If you need the Diagnostic Utility, download the update package from Dell's support website for your model. This package can be used to create a boot-able USB drive and/or CD/DVD. These work fine and are pretty fast also.
    Something strange happened to me and I am now reporting my experience in trying to solve it (somewhat unsuccessfully!!)
    First of all, my setup is: Dell Studio 1555 laptop. I dual boot Windows 7 and Archlinux. So here's how it went:
    After using the partitioning tool Gparted under Archlinux to resize a partition, I found a problem had occurred. The Partition was NTFS formatted and all of my data files were stored on it. The partition worked fine under Archlinux as I was able to access my files fine under it. But in Windows, although the partition was listed under Windows explorer, it wanted to format it!! When I tried to access the partition it gave an error that it was not formatted (
    The drive is not formatted, do you want to format it now?
    ). Of course, that was not right and Gparted had messed something up. I fixed that using Testdisk under Archlinux (See the Details). So now the partition problem under windows was fixed. But now another problem cropped up under Archlinux. When I booted into Archlinux and started Gparted to confirm everything was fine I saw something strange in Gparted. The whole space on my hard disk was marked as "unallocated" under Gparted. Windows and Archlinux could "see" the partitions. By this I mean that I was able to boot fine under both my OSes. And I could access all my files under all my partitions. But somehow Gparted was not able to "see" them. Gparted was reporting my whole disk to be marked as unallocated. After that I researched a lot and lots of stuff happened experimenting to fix the problem. I used a lot of utilities. But actually only one fixed the problem-fixparts from the gptfdisk package. But it seemed like a lot of work trying to get the problem fixed (See the Details).
    Now we get to the point in discussion. I was able to get my partitions back under Gparted. But I lost the Dell Diagnostics Utility partition's ability to boot up. [Actually, now that I reflect back on the incidence, I realize that the Dell Utility partition had lost its ability to boot long before I had messed up my partition table. But I realized it only when I was testing all my partition after fixing the partition table. But more on this later.] It gave an error that the partition was not found.
    So, in short: After all this restoring partitions' visibility under Gparted, I realized that the Dell Utility partition on my Studio 1555 was not booting up. To explain this, it means that when I press F-12 when starting the laptop and select Diagnostics from the menu to run the Diagnostic Utility and after running the Pre-boot System Assesment tests when I consented to boot the Diagnostic Utility partition, it gave me the error that the partition was not found. When I tried to run the "Dell 32 Bit Diagnostics (Graphical User Interface version)" update package under Windows, it resulted in a similar error: Partition not found.
    For some background on what makes the Dell Utility partition so special, please read this thread and the third post on this thread.
    WARNING: You and only you are responsible for your data. Please make a backup before performing any of the partitioning steps below.
    NOTE: Please read the entire post before actually performing the steps.
    So, to try and fix this I did the following:
    Boot into Windows 7.
    Open Disk Management under the Computer Management console (To open the Computer Management console, right click on Computer in the Start menu and select Manage).
    Reformat the Dell Diagnostic Utility partition as FAT(not FAT32). This is the first partition on the drive (marked as Healthy (OEM Partition) under the Status column). [This step may not be required, however I had done it. See Notes below.]
    UPDATE: After reading around a bit I found that these steps to format the partition might not actually be necessary. Simply changing the type of the partition (as detailed below) might also work. However as I had done that, lets just keep these steps over here.
    Reboot into a Linux distribution Live CD (I had Ubuntu 10.10). Or, If you dual boot with a Linux distribution that does not complain about the now inconsistent fstab entry, you can also boot into that distribution directly. I had to boot into Live CD to fix my /etc/fstab.
    UPDATE: After considering all the aspects from start to end I have come to a conclusion regarding the efficacy of this method on dual boot machines with Windows and Linux installed. I doubt anyone with a dual boot Windows/Linux setup would be able to boot into the Dell Diagnostic Utility even with the Utility Partition restored. This is detailed below.
    (As noted above my Archlinux install did not boot up after I had reformatted  my Dell Diagnostic Utility partition. This is because I was mounting the Dell Utility partition at boot using fstab inside Archlinux. And I was using the UUID to mount the partition. After reformatting the partition its UUID changed. So, it wouldn't mount. And because of how my fstab was setup Archlinux won't boot. So, I had to boot into a live environment to fix this. This step applied only to me. YRMV.) Fix the fstab entry.
    (This step also applied to me.) Boot into the repaired Linux Distribution.
    And open a Terminal.
    In the open terminal run fdisk on your drive, e.g.,
    fdisk /dev/sda
    This is how it looks:
    [abhishek@Nitaichand ~]$ sudo fdisk /dev/sda
    Password:
    Command (m for help):
    To change the partition type give the appropriate command, i.e.,
    Command (m for help): t
    Specify the partition, i.e.,
    Partition number (1-10): 1
    Type L to see available codes:
    Hex code (type L to list codes):L
    0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
    1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
    2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
    3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
    4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
    5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
    6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
    7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
    8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
    9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
    a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
    b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
    c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
    e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
    f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
    10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
    11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
    12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
    14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
    16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
    17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
    18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
    1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
    1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
    1e Hidden W95 FAT1 80 Old Minix
    Type the desired code, i.e.,
    Hex code (type L to list codes): de
    Write the partition table with:
    Command (m for help): w
    The partition table has been altered!
    Calling ioctl() to re-read partition table.
    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table. The new table will be used at
    the next reboot or after you run partprobe(8) or kpartx(8)
    Syncing disks.
    [abhishek@Nitaichand ~]$
    Download the required Diagnostics Update Package from the Drivers Download page for your model. Got mine from here.
    Run the downloaded package under the OS you it downloaded for. That is, run the .exe on Windows. Or, if you downloaded the .bin file for Linux then first make it executable:
    chmod u+x CL1367A0.bin
    And now run it under a Linux distribution with an older version of python installed (I think <2.7). I say this because the .bin package didn't run on an updated Archlinux for me, probably because it has the latest python. I ran it from the Ubuntu 10.10 Live CD and it ran fine under that.
    On Windows, If you are not automatically prompted with an option to update your Utility Partition then you need to browse to the location where the package was extracted (for me it was C:\dell\drivers\R239866).
    Now you need to manually run the extracted file (for me it was DDDP.exe). Most probably you'll need to right-click it and run it as an Administrator. And if all went well, it will extract/update the diagnostic utilities to/on the Dell Utility Partition.
    I believe the above steps should be sufficient for someone who's lucky and who's update package is smart enough. However these steps were not sufficient for me. My "Partition not found" error was gone because I had changed the partition type. And so the update package was able to recognize the partition and extract the necessary files to it. But I was still not able to boot the utility partition. After the Pre-boot System Assessment although I no longer got the "Partition not found" error, but I was just dropped onto the GRUB boot menu prompt.
    [UPDATE: As stated above, I realize that the recovery partition had lost its ability to boot long before I had messed up my partition table. But I realized it only when I was testing all my partition after fixing the partition table. Please refer to this forum thread for further Details. I  do not think that it is possible longer to boot from the Dell Utility Parttion on my setup which has GRUB installed to the MBR. But the rest of the post documents my attempts to slove the problem without the knowledge from the forum post.]
    Anyways, it was a pain to again and again set up/update the partition and test it after waiting half an hour or so for the Pre-boot System Assessment to complete. But I was determined to solve the problem at-least partially, until next time. So I created a GRUB entry to boot the Utility partition. Assuming the partition is the first partition on the drive (which is the case here), the grub entry is simply:
    title Dell Utility
    rootnoverify (hd0,0)
    chainloader +1
    I tried downloading an older update package. I updated my Partition with it. And tested. Still, I was unsuccessful. I researched a little bit and found this link. Out of frustration,I decided to use brute force this time . So, the below are the steps which let me have at-least a glimpse of The Dell Diagnostic Utility booting up from the partition:
    Backup your partition table using the sfdisk command (not fdisk).
    Follow the instructions in the link I gave above (i.e., http://community.spiceworks.com/how_to/show/1123) and build your Utility Partition from scratch.
    Now after that when you try to boot into the OS you'll be presented with an blue bar on top. This is because the mkup batch file from the Dell Diagnostic/Drivers CD/DVD wiped your partition table and rewrote it with only one partition on it- the Dell utility partition.
    Boot into a Live environment and restore your partition table from the backup created earlier using sfdisk.
    Now boot with a Windows disc to repair your Windows boot problem. This applied to me but may not apply to you.
    Again boot into a live environment and restore GRUB to MBR.
    After a reboot press F-12 to get to the BIOS boot menu and select Diagnostics.
    Let the Pre-boot Assessment run and after its complete it will ask you to press any key to boot the Dell Utility partition. Do that.
    You'll notice your still dropped into GRUB instead of getting the Diagnostics GUI.
    Now when on GRUB prompt don't boot any other OS.
    Press any key (other than <Enter>, that is ) to stop the timer if you have one set.
    Now look carefully at the boot menu.
    Remember I told you that I had created a GRUB menu entry to boot the Dell Utility partition. Select that. And if you are lucky you might just be able boot the partition. This worked for me (finally!).
    After this initial run I was unable to run the Diagnostics GUI from the GRUB menu entry again. I haven't tried to re-run the Pre-boot Assessment and wait to see, if I'm able to boot it from there. But now, I'm satisfied that at-least the file there are in a running condition.
    Also, the update package can be used to create boot-able USB drives or boot-able CD/DVDs which can run the Diagnostics just fine. They are almost as fast as the partition (especially the USB which seems even faster). They are recommend, instead of going into this trouble to recreate the partition. That is unless you are a purist/perfectionist .
    Notes:
    At first, I panicked and tried a lot of steps that are not exactly documented above for the sake of convenience to others who might refer.
    I have thus rewritten the post in a manner to make it very general in nature as it did not become very fruitful for myself.  If you attempt to use this guide, use common sense where necessary .
    Of course, if you are trying to build a Utility partition on a bare hard drive or you're feeling adventurous, you can always follow this link .
    Last edited by bhadotia (2012-10-08 19:03:18)

    bhadotia wrote:Anyway's the file downloaded from dell to update the partition for Studio 1555 is corrupted (checksums don't match). My partition still doesn't boot. I'm working to fix this and will update my post when I'm done.
    The file seems to create the CD/DVD/Image and USB just fine. So I used this only to create a CD image which I then wrote on a blank CD which seems to work fine. Also, I played around a bit and had some partial success in booting the partition. I've updated my original opening post with the new findings.
    Whew!! what a waste of time! Never want to do all of this again .
    Last edited by bhadotia (2012-03-03 00:05:22)

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

  • Problem with DBMS_METADATA.GET_DDL and subpartitions

    I have problems with DBMS_METADATA.GET_DDL in a 11gR2 (11.2.0.3) database on Linux. The following example shows the problem:
    CREATE TABLE Test_tbl
    C1 NUMBER(14),
    C2 NUMBER(14),
    C3 NUMBER(14)
    PARTITION BY RANGE (C1)
    SUBPARTITION BY LIST (C2)
    PARTITION Part1 VALUES LESS THAN (1000)
    , PARTITION Part2 VALUES LESS THAN (2000)
    CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    When I execute
    SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    on a 10g database (10.2.0.2.0) on Solaris Sparc and on a 11.1.0.7 on Windows, it gives the correct DDL statement within some seconds.
    On the 11.2.0.3 database (Linux) it hangs forever.
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    ^CERROR:
    ORA-01013: user requested cancel of current operation
    This behavior only seems to occur in combination with local indexes and subpartitions.
    Anyone any idea?
    Thx, Carsten

    user592634 wrote:
    I have problems with DBMS_METADATA.GET_DDL in a 11gR2 (11.2.0.3) database on Linux. The following example shows the problem:
    CREATE TABLE Test_tbl
    C1 NUMBER(14),
    C2 NUMBER(14),
    C3 NUMBER(14)
    PARTITION BY RANGE (C1)
    SUBPARTITION BY LIST (C2)
    PARTITION Part1 VALUES LESS THAN (1000)
    , PARTITION Part2 VALUES LESS THAN (2000)
    CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    When I execute
    SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    on a 10g database (10.2.0.2.0) on Solaris Sparc and on a 11.1.0.7 on Windows, it gives the correct DDL statement within some seconds.
    On the 11.2.0.3 database (Linux) it hangs forever.
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    ^CERROR:
    ORA-01013: user requested cancel of current operationWhy did you cencel this operation? Usually it takes time. If its taking more then it would be better to gather dictionary stats once.
    SQL>exec DBMS_STATS.GATHER_DICTIONARY_STATS;
    >
    This behavior only seems to occur in combination with local indexes and subpartitions.
    Anyone any idea?
    Thx, CarstenI didn't get any problem in 11.2.0.1 database:
    SQL> CREATE TABLE Test_tbl
      2  (
      3  C1 NUMBER(14),
      4  C2 NUMBER(14),
      5  C3 NUMBER(14)
      6  )
      7  PARTITION BY RANGE (C1)
      8  SUBPARTITION BY LIST (C2)
      9  (
    10  PARTITION Part1 VALUES LESS THAN (1000)
    11  , PARTITION Part2 VALUES LESS THAN (2000)
    12  );
    Table created.
    SQL>
    SQL> CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    Index created.
    SQL>
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    DBMS_METADATA.GET_DDL('INDEX','TEST_IDX')
      CREATE INDEX "SYS"."TEST_IDX" ON "SYS"."TEST_TBL" ("C3")
      PCTFREE 10 INITRAEdited by: 909592 on Mar 22, 2012 9:01 PM

  • Data Recovery from Partitioned and formatted Bit Locker Encrypted Drive

    Recently because of some issues in windows 7 installation from windows 8 installed OS. it was giving as the disc is dynamic windows can not be installed on it. so at last after struggling hard no other solution i partitioned and formatted my whole
    drive so all data gone included the drive which was encrypted by bit lockers.
    For recovery i used many software such as ontrack easy recover, get data back, recovery my files professional edition but still i couldnt able to recover my data from that drive. then i found some suggestion Using CMD to decrypt my data first 
    http://technet.microsoft.com/en-us/library/ee523219(WS.10).aspx
    where it shows it successfully decrypt my data at that moment my drives were in RAW format excluding on which windows is installed and then in CMD i check Chdsk which also shows no problem found. but now problem is still i coudnt able to recover
    my data then i format the drive D and again tried to recover data using above software after decryption still no result. 
    Now i need assistance how i can recover my encrypted drive as it was partitioned and also formatted but decrypted also as i have its recovery key too. thanks

    Hi ,
    I am afraid that we cannot get the data back if the drive has been formatted even if use the
    BitLocker Repair Tool.
    You’d better contact your local data recovery center to try to get data back.
    Tracy Cai
    TechNet Community Support

  • Few questions about partitioning and formatting in Windows 8

    Hello,
    I'm very shortly after a Windows 8 reinstall and I want to make use of this moment to finally understand partitioning and formatting in Windows 8.
    Before using Windows 8, I was an XP user for 5 years and I actually never bothered myself with formatting my main system partition, that's probably why my computer ended up working like a slime for the last years. Anyway, by now I have been using Windows 8 for a year.
    Three weeks ago I faced a system-related problem with my laptop (IdeaPad Y580) which prevented it from peacefully shutting down. A good friend of mine (XP user for his entire life, and now Windows 7 newbie user) told me, that I should keep all my non-system stuff on separate partition and that I should do the main system partition format from time to time to keep my PC out of trouble. It is sure that he took his knowledge from using XP, and here's my first question - does this method apply to Windows 8?
    I mean as far as I know, back then, in XP, partitioning was possible only during Windows installation, and now, in Windows 8 we have a Disk Management for this, which do not require running Windows installation to create new partitions.
    I'm mentioning this due to the fact that originally (I mean by factory settings) my drive has only one visible partition - C: (1TB), so I would need to use the Disk Management to take some space from C: partition and allocate it to the new D: partition.
    In case I do this whole partitioning operation and create a D: partition, is it sure that formatting my system-only C: partition won't have effects on my D: partition, and all the programms and data I have here will stay on their places and work after format? (I'm worried about this because I've seen in some partitioning guide a warning not to format the main partition after the partitioning operation, because it would erase totally all data - I'm not sure if I misunderstood something or is it a mistake? EDIT: here's the link for this guide, just jump to the "Final Thoughts" section to see what I'm taking about: http://www.technorms.com/8438/windows-8-create-hard-drive-partition ).
    If this whole method of keeping your system running fine doesn't apply to Windows 8, I guess I'm okay with having only one C: partition.
    By the way, it doesn't matter for me if I create new partition in terms of conflicts with preinstalled Lenovo OneKey Recovery, since I had to reinstall my Windows 8 recently from non-Lenovo CD, and either way my laptop is now totally clean, without Lenovo stuff (I found Lenovo Recovery CD for Y580 on the internet, but it had non-single-language Windows 8 in it, and I needed a single-laguage one in order to have my Product Key recognised, so I just used a pure Windows 8 SL installer)

    I just found out that I can't even transfer my Users folder or Program Data to other drive than the one with the system, because it would prevent me from updating my system or even from actually booting to my system. So apparently my whole topic is for nothing... I guess I should live with only one drive, and whenever my system totally crashes again I should do the backups to my external HDD. It's sad though that Windows 8 is a total opposite to user-friendly OS, to say the least.

  • Thunderbolt partitioned and formatted hard drive not recognized on USB2/3

    I have a MBA (mid 2012) and recently purchased a Seagate Desktop Thunderbolt Adapter (STAE129), a Seagate Backup Plus 4TB USB 3.0 external drive (STCA4000100), and Apple Thunderbolt cable. The 4TB hard drive can be separated from the USB 3.0 adapter and the drive placed on the Thunderbolt adapter. I created two partitions (3TB and 1 TB) on the 4TB drive while it was mounted on the Thunderbolt adapter and formatted them Mac OS Extended (Journaled) using partition map scheme GPT. Everything works as expected, the drive hits r/w speeds in the 180 MB/s range (using Blackmagic Disk Speed Test), and no issues at all transferring data to the 3TB partition and using the 1TB partition for TimeMachine.
    However, if I disconnect the hard drive from the Thunderbolt adapter and place it on the USB 3.0 adapter and connect it to my MBA, Mountain Lion says "The disk you inserted was not readable by this computer and gives me the options to Initialize, Ignore, or Eject. Going into Disk Utility app, the drive shows up without the partitions I created when the same drive was mounted to the Thunderbolt adapter (just shows disk1s1). In fact, the drive label (Disk Description) is different too and the Partition Map Scheme now shows MBR!
    To try work-arounds, I went ahead and repeated the partitioning and formatting steps with the drive attached via USB 3.0 and all works fine until I put the drive back on the Thunderbolt adapter where once again OSX reports that the disk is not readable. I've even tried a single partition with no luck. In short, the drive partitioned and formatted on Thunderbolt is unrecognized under USB and vice versa.
    Shouldn't the disk preparation and data be consistent across these different interfaces? I would think so. My biggest concern is that if I had a failure in the Thunderbolt setup (assuming the drive itself does not fail), then I can't access my data. This is not a very comfortable situation.
    I'm assuming I've overlooked a very basic detail. Appreciate any steer to solve this problem.
    Thanks,
    Rob

    Thanks for that, I recently ran into the same problem. I even chatted with Seagate tech support and they didn't know the answer.
    My situation is a bit different from you. I bought the 3 TB Thunderbolt version of the drive directly and then purchased a USB 3 adaptor seperately.  You see, I still own a 3 year old Macbook Pro that doesn't come with a Thunderbolt port. I was looking to upgade to a MacBook Air later.  I thought that I might as well buy the TB version now.
    In anycase, my old MacBook Pro won't see the drive when I use the USB3 adaptor. I get the same exact error message as you did. I can't really test it on Thunderbolt since I don't have one.  I'm going to go install the Thunderbolt drivers now and hopefully, it will recognize the drive afterwards.  I'll let you know what happens.
    BTW, I was thinking of reformatting the drive with NTFS so that I can use the drive on PCs. My mac has the NTFS drivers loaded so it's no problem. I hope this won't screw up the Thunderbolt connection later when I do get the Macbook Air?

  • New to Mac... I have partitioned my hard drive Dual Boot M.Lion/S. Leopard with 2 OS partitions and a Media Partition. How do I direct my file storage to the Media Partition? Can I put a "Media" folder on both OS Desktops that will allow me to drag n drop

    New to Mac... I have Partitioned my MacBookPro with Dual Boot Partitions running M.Lion and S. Leopard and a seperate media partition.
    How do I assign my storage to the MEDIA Partition once I am booted in either OS?
    Can I place a folder on my desktop so I can read/write ALL my media to?

    Why not? Make a folder in your media partition and put an alias folder (shortcut) on the desktop of each partition/ OS. You can right click on the folder in the media partition and click on "make alias".
    If you want to direct your iTunes media to point to the media partition, google "move iTunes library to external disk" and follow the steps; the instructions should be the same for a seperate partition as it is for an external drive.

Maybe you are looking for