Partitioning an Existing Table

Dear Forum,
Can we create partition on an existing table without dropping it in Oracle 11.2.0.3.0?
I know EXCHANGE PARTITION, but that I don't want.
Thank you & regards.

You cannot partition an existing table.
You have to create a new partitioned table and move the data from the old table to the new table. If you want to do this online, you can potentially leverage the DBMS_REDEFINITION package to help you out. Behind the scenes, you're still creating a new table and, eventually, dropping the old table after moving all the data over. DBMS_REDEFINITION hides some of that from you and lets the table remain online while you are moving the data. But it adds some performance overhead.
Justin

Similar Messages

  • How to create a partition on existing table?

    Hey
    Could some one please tell me on how to create a partition on existing table?

    Could some one please tell me on how to create a partition on existing table?
    You can't - that isn't possible. Unless a table is already partitioned you can NOT create another partition on it.
    You must either redefine the table as a partitioned table (using the DBMS_REDEFINITION package) or create a new partitioned table and move the data to its new partitions.
    The choice will depend on how much data the existing table has and whether you can do it offline.

  • What's the best practice to partition an existing table?

    We are using Oracle 11g EE 11.2.0.3.0. We want to partition an existing table. I found some information from this link [http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php], but I am not sure whether that's the best way. Could anyone share the best practice of partitioning an existing table?
    Thanks.
    Jun

    >
    We want to partition a few related tables. A couple of tables have about 30 million rows, and a couple of other tables have about 10 million rows. The data for those tables is for ~2000 accounts, each of them is identified by a column named "account_id". We want to partition the tables by using the "account_id" as the partition key to gain better performance for queries, so we would probably use hash partition. Please advise.
    >
    1. What evidence do you have that your performance will be any better if you partition those tables?
    2. What evidence do you have that there is anything wrong with the performance of your current queries?
    3. Have you reviewed the actual execution plans for your most important queries to see if there is even any room for improvement?
    If your query uses account_id as a predicate but only pulls a few records from a 'master' table for that key value your performance may actually be worse if you partition that table. That is because using an index range scan Oracle can easily find the ROWIDs of the rows that need to be selected and then easily retrieve them regardless of their physical location.
    If you have queries that do NOT use account_id but currently use indexes the performance of those queries may also be worse if you partition that table. Those indexes will be GLOBAL.
    There are two major implications when you use hash partitioning:
    1. Any query that does NOT include the partitioning key (account_id for your case) will, of necessity, have to use a full table scan if an appropriate index is not available.
    2. You will get NO management benefits such as being able to add/remove partitions that include old data.
    Before you decide to partition a table you should conduct tests and examine the execution plans for your important queries.

  • Partitioning an Existing Table with data

    Hi All,
    I am few tables with data, I need to Partition the table without affecting existing table values is it possible?.
    if yes then Please suggest me some ideas to archive that..
    Thanks & Regards
    Sami

    Hi All,
    I Need to partition for existing table with 1 million records
    1. First partition should be created for 6 months
    2.Second partition should created for 1 year.
    3.So as of now we have 6 months Data in production + another 6 months data in First partition + another 1 year data in Second partition.
    4.More than 2 year’s data’s should be moved other partition or archived.
    kindly provide your valuabe suggestion.
    Thanks & Regards
    Sami

  • Partition an existing table

    How can I partition an existing table? What's the SQL syntax?
    Thanks for help,
    Chen Zhao

    Does anybody know how to partition an existing table?
    YES! That is the simple answer to your question. There are a lot of people that know how to do that.
    Whether partitioning is appropriate and, if so, which method might be 'best' for YOU depends on the particulars of your use case. But as with most problems you need to make sure you troubleshoot whatever issue you have in the proper order:
    1. Identify a PROBLEM or issue that needs to be resolved - you haven't told us anything. Please post info about this
    2. Validate that the problem/issue actually exists (it could just be a fluke occurence)
    3. Identify potential solutions to the problem/issue - that list of solutions may, or may not, include partitioning
    4. Select a small number (e.g. 1 or 2) of those solutions for further analysis and actual tests.
    5. Select the 'best' (based on your orgs criteria) of those tested solutions for implemention
    You seem to already be on step #5. But in order for us to help you we have to understand what the results of steps 1 thru 4 are.
    Please post the information about your PROBLEM that we need to help you.

  • Create partition to existing table

    I have a existing table which is not partitioned. How can partition my existing table?

    oops.... This is more better....
    Partitioning an Existing Table
    http://www.oracle-base.com/articles/misc/PartitioningAnExistingTable.php
    Other method
    (1) create new_table with oen or more range partition.
    (2) alter table new_table exchange partition with old_table.
    (3) rename or drop old_table.
    (4) rename new_table to old_table.
    (5) split or add partition.
    -- Examples
    --(1)
    create table part_tab
    partition by range (col)
    (partition p1 values less than (maxvalue))
    as select * from org_tab where 1=0;
    --(2)
    alter table part_tab
    exchange partition p1 with table org_tab
    without validation
    --(3)
    rename org_tab to backup_table;
    --(4)
    rename part_tab to org_tab;
    --(5)
    alter table org_tab
    split partition p1 at (100)
    into (partition p1, partition p2);
    alter table org_tab
    split partition p2 at (200)
    into (partition p2, partition p3);
    -- Results
    SQL> select * from org_tab partition(p1);
    COL        VC
    99         abc
    SQL> c/p1/p2
      1* select * from org_tab partition(p2)
    SQL> /
    COL        VC
    199        def
    Original is written in Japanese language (OTN Japan)
    http://otn.oracle.co.jp/forum/message.jspa?messageID=3045618?
    Message was edited by:
    ushitaki

  • Creating Partitions in Existing tables with Data

    Hello everyone,
    I want to know what the best way of creating partitions, in tables having data, is .. ???
    thanks
    Rossy Rocs

    There are two ways :
    1a Create a new Partitioned Table
    1b Copy data from the existing table to the new table
    1c Create Indexes
    1d Rename old table
    1e Rename new table
    OR
    2 Use DBMS_REDEFINITION
    See
    http://www.oracle-base.com/articles/misc/PartitioningAnExistingTable.php
    Hemant K Chitale

  • Suggestions for table partition for existing tables.

    I have a table as below. This table contains huge data. This table has so many child tables .I am planning to do a 'Reference Partitioning' for the same.
    create table PROMOTION_DTL
      PROMO_ID              NUMBER(10) not null,
      EVENT                 VARCHAR2(6),
      PROMO_START_DATE      TIMESTAMP(6),
      PROMO_END_DATE        TIMESTAMP(6),
      PROMO_COST_START_DATE TIMESTAMP(6),
      EVENT_CUT_OFF_DATE    TIMESTAMP(6),
      REMARKS               VARCHAR2(75),
      CREATE_BY             VARCHAR2(50),
      CREATE_DATE           TIMESTAMP(6),
      UPDATE_BY             VARCHAR2(50),
      UPDATE_DATE           TIMESTAMP(6)
    alter table PROMOTION_DTL
      add constraint PROMOTION_DTL_PK primary key (PROMO_ID);
    alter table PROMOTION_DTL
      add constraint PROMO_EVENT_FK foreign key (EVENT)
      references SP_PROMO_EVENT_MST (EVENT);
    -- Create/Recreate indexes
    create index PROMOTION_IDX1 on PROMOTION_DTL (PROMO_ID, EVENT)
    create unique index PROMOTION_PK on PROMOTION_DTL (PROMO_ID)
    -- Grant/Revoke object privileges
    grant select, insert, update, delete on PROMOTION_DTL to SCHEMA_RW_ROLE;I would like to partition this table .Most of the queries contains the following conditions.
    promo_end_date >=   SYSDATE
    and
    (event = :input_event OR
    (:input_Start_Date <= promo_end_date           
    AND promo_start_date <= :input_End_Date))Any time the promotion can be closed by updating the PROMO_END_DATE.
    Interval partioning on PROMO_END_DATE is not possible as PROMO_END_DATE is a nullable and updatable field.
    I am now to table partition.
    Any suggestions are welcome...

    DO NOT POST THE SAME QUESTION IN MULTIPLE FORUMS PLEASE!
    Suggestions for table partition of existing tables

  • Table partitioning (intervel partitioning) on existing tables in oracle 11g

    Hi i'm newbie to table partitioning. I'm using 11g. I have table of size 32 gb (which has 22 million records) and i want to apply interval partition on that table. I created a empty table with a partition having columns same as source table and take dump of the source table and import into the new partition table. can you please suggest how to import table dump into new table? also is there any other better idea to do the same.

    Hi,
    imp user/password file=exp.dmp ignore=y
    The ignore=y causes the import to skip the table creation and continues to load all rows.
    On the other hand, you can insert data into the partitioned table with a subquery from the non-partitioned table such as follows;
    insert into patitioned_table
    select * from original_table;
    Hope it helps,

  • Partitioning of existing tables.. based on date

    Hello Friends,
    I have some tables where their is a column called x_as_of_dt COLUMN with DATE as the datatype.
    All the tables have already got data populated.
    Now I want to partition the tables based on column x_as_of_dt by YYYYMM
    How to approach this scenario..
    Appreciate your help
    thanks/kumar

    Hello Justin,
    I found that all the tables have indexes and check constraint only ( no primary and foreign key constraints ) for the tables that need to be partitioned .
    The actual table structure is like this.. ( Am using toad and this is the script from toad )
    CREATE TABLE X_FA_X_HOUSEHOLD
    FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
    HOUSEHOLD_RK NUMBER(10) NOT NULL,
    X_AS_OF_DATE DATE NOT NULL,
    FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
    HOUSEHOLD_ID NUMBER(10),
    X_BRANCH_ID VARCHAR2(3 BYTE),
    X_FA_HHD_PCT_SPLIT NUMBER(7,4) NOT NULL,
    X_RANK_NUM NUMBER(3),
    PROCESSED_DTTM DATE
    TABLESPACE KAW_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX XPKX_FINANCIAL_ADVISOR_X_HOUSE ON X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK, HOUSEHOLD_RK, X_AS_OF_DATE)
    LOGGING
    TABLESPACE KAW_IDX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    GRANT SELECT ON X_FA_X_HOUSEHOLD TO KAW_READ_ROLE;
    REQUIREMENT: - I got to implement the partion on this table for the column - X_AS_OF_DATE
    STEP 1 - CREATE A PARTITIONed table
    CREATE TABLE PARTITION_X_FA_X_HOUSEHOLD
    FINANCIAL_ADVISOR_RK NUMBER(10) NOT NULL,
    HOUSEHOLD_RK NUMBER(10) NOT NULL,
    X_AS_OF_DATE DATE NOT NULL,
    FINANCIAL_ADVISOR_ID VARCHAR2(6 BYTE),
    HOUSEHOLD_ID NUMBER(10),
    X_BRANCH_ID VARCHAR2(3 BYTE),
    X_FA_HHD_PCT_SPLIT NUMBER(7,4) NOT NULL,
    X_RANK_NUM NUMBER(3),
    PROCESSED_DTTM DATE
    PARTITION BY RANGE (X_AS_OF_DATE)(
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200801 VALUES LESS THAN (TO_DATE(' 2008-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200802 VALUES LESS THAN (TO_DATE(' 2008-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200803 VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200804 VALUES LESS THAN (TO_DATE(' 2008-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200805 VALUES LESS THAN (TO_DATE(' 2008-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200806 VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200807 VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200808 VALUES LESS THAN (TO_DATE(' 2008-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200809 VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200810 VALUES LESS THAN (TO_DATE(' 2008-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200811 VALUES LESS THAN (TO_DATE(' 2008-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200812 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200901 VALUES LESS THAN (TO_DATE(' 2009-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200902 VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200903 VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200904 VALUES LESS THAN (TO_DATE(' 2009-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200905 VALUES LESS THAN (TO_DATE(' 2009-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200906 VALUES LESS THAN (TO_DATE(' 2009-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200907 VALUES LESS THAN (TO_DATE(' 2009-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200908 VALUES LESS THAN (TO_DATE(' 2009-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200909 VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200910 VALUES LESS THAN (TO_DATE(' 2009-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200911 VALUES LESS THAN (TO_DATE(' 2009-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P200912 VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201001 VALUES LESS THAN (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201002 VALUES LESS THAN (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201003 VALUES LESS THAN (TO_DATE(' 2010-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201004 VALUES LESS THAN (TO_DATE(' 2010-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201005 VALUES LESS THAN (TO_DATE(' 2010-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201006 VALUES LESS THAN (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201007 VALUES LESS THAN (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201008 VALUES LESS THAN (TO_DATE(' 2010-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201009 VALUES LESS THAN (TO_DATE(' 2010-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201010 VALUES LESS THAN (TO_DATE(' 2010-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201011 VALUES LESS THAN (TO_DATE(' 2010-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201012 VALUES LESS THAN (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201101 VALUES LESS THAN (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201102 VALUES LESS THAN (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201103 VALUES LESS THAN (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201104 VALUES LESS THAN (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201105 VALUES LESS THAN (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201106 VALUES LESS THAN (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201107 VALUES LESS THAN (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201108 VALUES LESS THAN (TO_DATE(' 2011-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201109 VALUES LESS THAN (TO_DATE(' 2011-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201110 VALUES LESS THAN (TO_DATE(' 2011-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201111 VALUES LESS THAN (TO_DATE(' 2011-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION P201112 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    PARTITION PMAX VALUES LESS THAN (MAXVALUE) )
    STEP 2 - Loading the data ---------
    loading of data is as follows..
    INSERT INTO PARTITION_X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK,
    HOUSEHOLD_RK,
    X_AS_OF_DATE,
    FINANCIAL_ADVISOR_ID,
    HOUSEHOLD_ID,
    X_BRANCH_ID,
    X_FA_HHD_PCT_SPLIT,
    X_RANK_NUM,
    PROCESSED_DTTM
    ) SELECT FINANCIAL_ADVISOR_RK,
    HOUSEHOLD_RK,
    X_AS_OF_DATE,
    FINANCIAL_ADVISOR_ID,
    HOUSEHOLD_ID,
    X_BRANCH_ID,
    X_FA_HHD_PCT_SPLIT,
    X_RANK_NUM,
    PROCESSED_DTTM
    FROM X_FA_X_HOUSEHOLD
    Step 3: - Creating indexes
    CREATE UNIQUE INDEX XPKX_FINANCIAL_ADVISOR_X_HOUSE ON PARTITION_X_FA_X_HOUSEHOLD
    (FINANCIAL_ADVISOR_RK, HOUSEHOLD_RK, X_AS_OF_DATE)
    Step 4: - Droping the actual table
    DROP TABLE X_FA_X_HOUSEHOLD
    Step 5: Renaming the partitioned table to old tablemame
    ALTER TABLE PARTITION_X_FA_X_HOUSEHOLD RENAME TO X_FA_X_HOUSEHOLD
    Does the above steps are correct - pls confirm.
    thanks/kumar

  • Partition an Existing Table with Data

    We have a table that is approx. 23Gb with 90 million rows. We need to partition it. What is the fastest or most efficient way to accomplish this? Oracle 10.2.0.4.

    user1175547 wrote:
    We have a table that is approx. 23Gb with 90 million rows. We need to partition it. What is the fastest or most efficient way to accomplish this? Oracle 10.2.0.4.you can use DBMS_REDEFINITION, also exchange partition is also a good solution :)
    http://www.oracle-base.com/articles/misc/PartitioningAnExistingTableUsingExchangePartition.php

  • Partitioning an Existing Table using DBMS_REDEFINITION with no primary key?

    HI,
    Is it possible to partiiton a table with dbms_redefination if the table contains no primary key?
    DB version 10.2
    Thank you All..

    Yes, of course, but you'll have to use rowID with "CONS_USE_ROWID" : http://68.142.116.68/docs/cd/B19306_01/appdev.102/b14258/d_redefi.htm#CBBFDJBC
    This will be longer but it is possible.

  • Range Partitioning Existing table

    Hi,
    I have a table with numeric field. I want to range partition the existing table. I used the following query
    alter table dept add partition by range(deptno) (
    partition p1 values less than (20),
    partition p1 values less than (40))
    It gives me ORA-00902: invalid datatype.
    What am I doing wrong? Is it possible to partition an existing table?
    Regards,
    Subbu S.

    Hi,
    You cannot partition an existing table with an ALTER TABLE command. There are couple of techinques with which you can partition an existing table, like:
    1) Rename existing table, create a new partitoned table and move data.
    2) Using DBMS_REDEFINITION package.
    Have a look at the following links for details:
    http://www.oracle-base.com/articles/misc/PartitioningAnExistingTable.php
    http://www.dba-oracle.com/oracle_news/2004_3_9_rittman.htm
    Regards
    Asif Momen
    http://momendba.blogspot.com

  • Partitioning an already existing table

    Hi,
    I need to partition many existing tables. All these tables hold more than 50 million data each.
    Since i am new to partitioning, can any one kindly guide what are the best practices one should look for under such circumstances.
    Is it neccessary to dwell on the following point
    1) Type of table (Heap or IOT etc).
    2) Indexes and kinds of indexes along with the columns in which they are defined.
    3) Block size
    4) Constraints
    5) Row Chaining, Migration etc.
    I have very basic idea about the above mentioned points.
    Please guide me as to how should the partitioning be done, what sort of partitioning is best, any performace issues.
    I sincerely appreciate the cooperation of all members.
    Thanks in advance
    Message was edited by:
    Master

    Hi,
    to create a partitioned table from the non portioned table
    create table part partition XXXXXXXX
    (partition p01 tablespace XX1,
    partition p02 tablespace XX2,
    partition p03 tablespace XX3,
    partition p04 tablespace XX 4
    nologging
    as select * from old data ;
    OR
    export the old non partition table data – rename the non partitioned table, create partitioned table import the data
    OR
    Exchanging Partitions
    You can convert a partition (or sub partition) into a non-partitioned table, and a non-partitioned table into a partition (or sub partition) of a partitioned table by exchanging their data segments. You can also convert a hash-partitioned table into a partition of a range-hash partitioned table, or convert the partition of the range-hash partitioned table into a hash-partitioned table. Similarly, you can convert a list-partitioned table into a partition of a range-list partitioned table, or convert the partition of the range-list partitioned table into a list-partitioned table
    One of the great features about partitioning, and most specifically range-based partitioning, is the ability to load in new data quickly and easily with minimal impact on the current users. The manuals indicate that the critical command to achieve this is as follows:
    alter table pt_tab1 exchange partition p_9999
    with table new_data
    Ani

  • Partitioning existing tables

    hello everyone,
    I've to partition an existing table.
    On searching net I found below example @ AskTom
    It created a new table T2 and used DBMS_REDEFINITION package
    I now have doubts regarding the same:
    - What happens to existing table (here, T1)
    - Does data also gets copied to T2
    - Or why can't oracle provide us with something like 'alter table add List | range | hash partition ... ;
    Thanks,
    Rossy.Rocs

    Hi,
    - What happens to existing table (here, T1)
    - Does data also gets copied to T2
    - Or why can't oracle provide us with something like 'alter table add List | range | hash partition ... ;Refer to the link,
    http://www.dba-oracle.com/oracle_news/2004_3_9_rittman.htm
    and you can go for "EXCAHNGE PARTITION"
    http://www.oracle-base.com/articles/8i/PartitionedTablesAndIndexes.php
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

Maybe you are looking for

  • Standard Report or Transaction for Outstanding Purchased Materials?

    Hello, Is there a report or transaction that could be used to see a list of all pending purchased material requirements with requirement date? So, pending Purchase Requisitions and Purchase Orders with a required delivery date?  We want to create sho

  • Add a file to to MIME object at runtime

    In runtime, Is there any option to create a file at runtime and after that add that file to MIME objects??

  • Problem creating JDBC dataview to oracle on Windows

    Hi, I'm trying to configure a JDBC dataview to an Oracle 10g database on DSEE 6.3.1 running Windows 2008 Here are the command I used: dpconf create-jdbc-data-source -b MYDBSID -B jdbc:oracle:thin://dbhost:1510: \      -J file://e:\dsee\ojdbc14.jar \

  • Trouble with disappearing image in table --

    This is totally weird and I can't figure out why it's happening. I'm new to DW8, although I have used a much older version of DW a lot. No matter how I create the header for http://www.amafca.org/convertedindex.htm, the very top banner image is getti

  • Mac Mail contacts no longer auto filling in the 'to' field

    I have suddenly lost the ability to have the contacts from my account in my contacts program auto fill int he 'TO' section of Mac Mail Yosemite 10.10.2 the contacts are there in Contacts and they were auto addressing as I typed a few letters now they