Make partitioning an existing regular table

Hi,
I am using oracle 9i R2 on linux Red hat 4.4.My question is, I have a table in database with the name of employee
and want to make partition this table (Range Partition).Which steps should i follow to convert this regular table in range partition table.
SQL> desc employee
Name Null? Type
DATE DATE
EMPLOYEE_ID NOT NULL NUMBER(6)
LASTNAME NOT NULL VARCHAR2(25)
SALARY NOT NULL NUMBER(8,2)
Thanks.

Sh.Ahmad wrote:
Hi,
I am using oracle 9i R2 on linux Red hat 4.4.My question is, I have a table in database with the name of employee
and want to make partition this table (Range Partition).Which steps should i follow to convert this regular table in range partition table.
SQL> desc employee
Name Null? Type
DATE DATE
EMPLOYEE_ID NOT NULL NUMBER(6)
LASTNAME NOT NULL VARCHAR2(25)
SALARY NOT NULL NUMBER(8,2)
Thanks.refer the link:-
http://arjudba.blogspot.com/2008/11/how-to-convert-non-partitioned-table-to.html
http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c12parti.htm

Similar Messages

  • Partitioning on existing regular table

    Hi,
    How can I add partition on existing regular table?
    I am using Oracle 11g (Release 11.2.0.2.0)
    Thanks.

    You can use DBMS_REDEFINITION to partition an existing table:
    http://uhesse.wordpress.com/2010/02/15/partitioning-a-table-online-with-dbms_redefinition/

  • 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.

  • "RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'name'. Make sure it exists and that its name is spelled correctly.

     When I run the code below I get the following error:"RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'False'. Make sure it exists and that its name is spelled correctly. Note that I do not call
    anything by the name of "false" anywhere in this code.
    The subject code (the underscored line of code is highlighted in the debugger when the error occurs):
    Option Compare Database
    Private Sub JobAssign_Click()
    MatLotListAvail_openform
    End Sub
    Function MatLotListAvail_openform()
    Dim dbsAPIShopManager2010 As DAO.Database
    Dim rstMaterialLotJobJoint As DAO.Recordset
    Dim strSQL As String
    Set dbsAPIShopManager2010 = CurrentDb
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID" = "tempvars!JobID" And "MatLotID" = "tempvars!MatLotID"
    Set rstMaterialLotJobJoint = dbsAPIShopManager2010.OpenRecordset(strSQL, dbOpenDynaset)
    If rstMaterialLotJobJoint.EOF Then
    DoCmd.OpenForm "JobAssignMatConf", acNormal, "", "", acEdit, acNormal
    Forms!JobAssignMatConf!PartapiIDVH = TempVars!PartapiID
    Forms!JobAssignMatConf!JobapiIDVH = TempVars!JobapiID
    Forms!JobAssignMatConf!JobIDVH = TempVars!JobID
    Forms!JobAssignMatConf!MaterialLotIDVH = TempVars!MatLotID
    Forms!JobAssignMatConf!Desc = TempVars!MatDesc
    Forms!JobAssignMatConf!recdate = TempVars!recdate
    DoCmd.Close acForm, "MaterialLotListAvailable"
    Else: MsgBox "This material lot has already been assigned to this job."
    DoCmd.Close acForm, "MaterialLotListAvailable"
    End If
    End Function

    I think the SQL statement should be
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID=" & _
    tempvars!JobID & " AND MatLotID=" & tempvars!MatLotID
    This assumes thatJobID and MatLotID are number fields.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • 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

  • 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

  • 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

  • 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

  • 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

  • How to change the partition type on a table with data

    Hi
    I have a table, which is partitioned by list on date column. The table contains large volume of data.
    My requirement is to make the list partition into range on the same date column.
    I am working on Oracle10g
    Kindly advice

    partitioned by list on date How many distinct DATE values do you have ? Each DATE value would be a Partition in List Partitioning.
    Why do you need to convert this to RANGE Partitioning ? How many DATE values do you expect in the table in the future ?
    You can use DBMS_REDIFINITION to copy a LIST Partitioned Table to a RANGE Partitioned Table and then switch the tables at the end.
    See examples (where the source table is not partitioned)
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    http://uhesse.com/2010/02/15/partitioning-a-table-online-with-dbms_redefinition/
    But before converting I would justify why a LIST Partitioned Table be converted to RANGE Partitioned. Do you have Date-Range queries ?
    Hemant K Chitale
    Edited by: Hemant K Chitale on Mar 15, 2013 2:11 PM

  • Add a new field to an existing Condition table

    How can I add a new field to an existing condition table?
    I have table 971 and I want to add INCOTERMS (INCO1) to this existing table but do not see how to add it.
    Thanks

    Hi Vicky,
        I dont think you can add new fields to the condition table once you have activated the condition table.
    SAP says you can only make limited changes to the condition table, like changing the description, fast entry screen, header and footer fields, but not able to add new fields to the table, and I think that is the correct approch or else for the same table you will have two sets of condition records.
    Please refer to the below link:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/de/7a8534c960a134e10000009b38f83b/frameset.htm
    What you can do is create a new condition table with additional field and assign this table before the currently used table in the access sequence.
    Hope this helps.
    Regards
    Raj

  • How to format one partition from existing filesysem

    Hi All,
    I want to install ASM on my RHEL machine. There is one disk which has been partitioned into regular filesystem as follows:
    [root@*** /]# fdisk -l
    Disk /dev/hda: 644.2 GB, 644245094400 bytes
    255 heads, 63 sectors/track, 78325 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1          25      200781   83  Linux
    /dev/hda2              26       57392   460800427+  83  Linux
    /dev/hda3           57393       61471    32764567+  82  Linux swap / Solaris
    /dev/hda4           61472       78325   135379755    5  Extended
    /dev/hda5           61472       78325   135379723+  83  Linux
    My question is, how can I format and merge a couple of partitions from these to create a volume for ASM? Is it even possible?
    Regards,
    Vinod

    SenthilKumar - Oracle wrote:
    It can be done as below:
    #fdisk /dev/hda
    p
    --To print partitions
    d
    --To delete partition, chose 2[This will erase the contents in it]
    n
    --Create new partition
    choose p to create primary partition
    now /dev/hda1 can be used as  ASM disk.
    #chown oracle:oinstall /dev/hda1
    login to ASM and update the asm_diskstring to include this disk and run "select* from v$asm_disk" we can see this new disk as CANDIDATE Or Provisioned
    Thanks,
    Senthil
    Dangerous - the default partition type of a newly created partition is ext3. Which means the kernel will view that partition as a regular file system - and will attempt to mount and use it. A sysadmin will not know, looking at the type of partition, that it is not an ext file system, but in fact a raw device.
    One needs to avoid this confusion - as it easily can trash your entire database's storage (diskgroup). With the only option being to restore backups that likely is out of date, or non-existent. (given the lackadaisical attitude to use a file system partition as a raw device, it is a reasonable assumption that backups are in a similar sorry state)
    PS. and the question was how to use /dev/hda2 - you described removing that partition and then using /dev/hda1 (which will likely trash the root file system).

  • Partition exchange error on table with nested table

    On Oracle 11.2.0.1, I have a partitioned table with some partitions that need to be 'archived' (in terms of moving partitions to an 'archive' table).
    I have a source table like:
    CREATE TABLE IS_PODACI245
      ID_OBJEKTA_IDENTIFIKACIJA  NUMBER(10),
      ID_OBJEKTA                 NUMBER(20),
      DATUM                      TIMESTAMP(6)       NOT NULL,
      TZ                         NUMBER(3),
      DATA1                      NUMBER(10),
      DATA2                      NUMBER(6),
      DATA3                      NUMBER(10),
      DATA4                      NUMBER,
      DATA5                      T_NTCIP_CLIMATE_TABLE
    NESTED TABLE DATA5 STORE AS IS_PODACI245_STORE_TABLE
    TABLESPACE DATA
    PARTITION BY RANGE (DATUM)
      PARTITION P_201107 VALUES LESS THAN (TIMESTAMP' 2011-08-01 00:00:00')
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE INDEX IDX_IS_PODACI245_KOMPLEKS ON IS_PODACI245
    (ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
      TABLESPACE DATA
    LOCAL ( 
      PARTITION P_201107
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOPARALLEL;
    CREATE OR REPLACE TYPE t_ntcip_climate_table as table of t_ntcip_climate_fmt;
    CREATE OR REPLACE TYPE t_ntcip_climate_FMT as object
    (  dev_index number(6)
    ,   dev_description varchar2(512)
    ,   dev_type number(10)
    ,   dev_status number(10)
    ,   dev_mfr_status varchar2(512)
    ,   dev_active number(3)
    ,   dev_test_activation number(10)
    /I would like to make exchange partition using stage table, and everything is going fine on all tables, but only on a few of them (listed source is one of them, and they're only tables with nested tables wihin), where I get an error.. but sometimes ;)
    on a statement like:
    ALTER TABLE IS_PODACI245_ARH EXCHANGE PARTITION P_201106  WITH TABLE IS_PODACI245_STAGE EXCLUDING INDEXES  WITHOUT VALIDATION;I got an error:
    ORA-00001: unique constraint (TXV.SYS_C0032911) violated
    it's an unique index between parent and nested table.
    what could cause that problem?

    Dear,
    I suppose that the unique constraint
    ORA-00001: unique constraint (TXV.SYS_C0032911) violatedis the one you 've created on the nested table IS_PODACI245_STORE_TABLE
    If so, why not disable that constraint and try again.
    I have never exchanged such a kind of partitioned table having a nested table in it. But, I could imagine that the cloned non partitioned table IS_PODACI245_STAGE should at least be the exact image of the partitioned table IS_PODACI245_ARH (of course without the partition part) but with the nested table part and including all indexes
    In addition, if you have a parent/child relationship between your partitioned tables, then there is a chronological order of exchange starting by the child and then finishing by the parent
    see the following link for more information about this order of exchange (and comment 2 for an example also)
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/#more-65
    Hope this helps
    Mohamed Houri

Maybe you are looking for

  • SAP GRC NF-e 10.0 - Problema durante Upgrade (mensagem /XNFE/APP 011)

    Boa tarde a todos! Realizamos o "Upgrade" do SAP GRC NF-e da versão 1.0 para a versão 10.0 (SLL-NFE 900, nível 0008) e estamos convivendo com um problema em uma mensagem XML do PI. Na transação SXMB_MONI, monitor de mensagens processadas, ao filtrar

  • How do I change the colour of a PS frame?

    I am creating christmas cards and adding photos of my kids onto christmas backgrounds. I am dragging frames from the right hand side but want to change the colour of these frames - can someone please tell me how to do that? I've worked out how to do

  • Data transfer from SQL to SAP r/3

    Hi, We have a scenario wherein we require to get data from two tables in SQL and send the data to r/3 and do some some calculation. finally save the data in tables. Can you please help me out the best way to do so. Is it Flat file transfer or RFC. Pl

  • Why doesn't Quicktime 7 for windows connect to the internet?

    I know others that have quicktime and when they updated their's wouldn't work either. I get a white screen when I try to view trailers as well. Is this because it only works on macs?

  • Know the field names in 1 table

    Hi, i would like to know is there any way that we can know how many column inside the table in the database n what is the column names? for example: table supplier supplierId supplierName address so there are 3 columns and the names are supplierId, s