Maximum of partition per table

Dear all,
I would like to ask
How many of maximum of partition per table?
I see in Oracle Doc is
Maximum number of partitions allowed per table or index is    1024K - 1
What it means?
thnx

In theory, it is 1million-1.
However, in practice, I would limit the number of partitions to thousands.  The shared pool data dictionary cache would be flooded with information about the partitions and their statistics when you are accessing the table.
Hemant K Chitale

Similar Messages

  • Maximum number of partitions allowed per table.

    Interesting findings with interval partitioning:
    SQL> SELECT  *
      2    FROM  v$version
      3  /
    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 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> DROP TABLE tbl PURGE
      2  /
    Table dropped.
    SQL> CREATE TABLE tbl(
      2                   id number(6),
      3                   dt date
      4                  )
      5    PARTITION BY RANGE(dt)
      6      INTERVAL (INTERVAL '1' DAY)
      7      (
      8       PARTITION p1 VALUES LESS THAN (date '-857-12-31')
      9      )
    10  /
    Table created.
    SQL> select  partition_name,
      2          high_value
      3    from  user_tab_partitions
      4    where table_name = 'TBL'
      5  /
    PARTITION_NAME HIGH_VALUE
    P1             TO_DATE('-0857-12-31 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'N
                   LS_CALENDAR=GREGORIAN')
    SQL> INSERT
      2    INTO tbl
      3    VALUES(
      4           1,
      5           sysdate
      6          )
      7  /
    1 row created.
    SQL> DROP TABLE tbl PURGE
      2  /
    Table dropped.
    SQL> CREATE TABLE tbl(
      2                   id number(6),
      3                   dt date
      4                  )
      5    PARTITION BY RANGE(dt)
      6      INTERVAL (INTERVAL '1' DAY)
      7      (
      8       PARTITION p1 VALUES LESS THAN (date '-858-01-01')
      9      )
    10  /
    Table created.
    SQL> select  partition_name,
      2          high_value
      3    from  user_tab_partitions
      4    where table_name = 'TBL'
      5  /
    PARTITION_NAME HIGH_VALUE
    P1             TO_DATE('-0858-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'N
                   LS_CALENDAR=GREGORIAN')
    SQL> INSERT
      2    INTO tbl
      3    VALUES(
      4           1,
      5           sysdate
      6          )
      7  /
      INTO tbl
    ERROR at line 2:
    ORA-14300: partitioning key maps to a partition outside maximum permitted number of partitions
    SQL> From Logical Database Limits:
    Maximum number of partitions allowed per table or index: 1024K - 1
    I always thought limit implies to number of actual, not potential partitions, however it looks like I was wrong, although it makes not much sense to limit potential and not actual partitions:
    SQL> select  trunc(sysdate) - date '-858-01-01',
      2          1024 * 1024 - 1
      3    from  dual
      4  /
    TRUNC(SYSDATE)-DATE'-858-01-01' 1024*1024-1
                            1048661     1048575
    SQL> select  to_char(DATE'-858-01-01' + 1048575,'MM/DD/YYYY')
      2    from  dual
      3  /
    TO_CHAR(DA
    11/17/2012
    SQL> So tomorrow "magic" date should increase by one day. I'll test it. But more interesting if tomorrow I will be able to insert a row that forms a new partition into table TBL.
    SY.

    rp0428 wrote:
    The other argument is that Oracle has to be able to automatically create any partition required and it can only create 1024k - 1. So if you create yours with sysdate how could it create all of the others?Not sure I follow. What is the purpose of counting potential partitions? Partition part# iin sys.tabpart$ is not assigned based on potential partition position. If I issue a DDL to create new partition regardless of interval/non-interval partitioning Oracle has to check how many partitions table has so far or po and raise same/similar exception if partition I am asking to create is over the limit. And, in any case, knowing we can create all potential partitions at table create time doesn't mean I will not try to insert data outside the range. So there is absolutely no guarantee Oracle can automatically create any partition requested. Again, I don't understand why creating non-interval partitioned table with a single initial partition has partition count of 1:
    SQL> DROP TABLE tbl1 PURGE
      2  /
    Table dropped.
    SQL> CREATE TABLE tbl1(
      2                    id number(6),
      3                    dt date
      4                   )
      5    PARTITION BY RANGE(dt)
      6      (
      7       PARTITION p1 VALUES LESS THAN (date '-857-12-31')
      8      )
      9  /
    Table created.
    SQL> SELECT  partition_count
      2    FROM  user_part_tables
      3    WHERE table_name = 'TBL1'
      4  /
    PARTITION_COUNT
                  1
    SQL>And interval partitioned table with same single initial partition has partition count of 1048575:
    SQL> CREATE TABLE tbl1(
      2                    id number(6),
      3                    dt date
      4                   )
      5    PARTITION BY RANGE(dt)
      6      INTERVAL (INTERVAL '1' DAY)
      7      (
      8       PARTITION p1 VALUES LESS THAN (date '-857-12-31')
      9      )
    10  /
    Table created.
    SQL> SELECT  partition_count
      2    FROM  user_part_tables
      3    WHERE table_name = 'TBL1'
      4  /
    PARTITION_COUNT
            1048575
    SQL> Would be interesting to find out what forces Oracle to go into potential partition mode for interval partitioning.
    SY.

  • Aggregate tables have many partitions per request

    We are having some performance issues dealing with aggregate tables and
    Db partitions. We are on BW3.5 Sp15 and use Oracle DB 9.2.06. After
    some analysis, we can see that for many of our aggregates, there are
    sometimes as much as a hundred partitions in the aggregates fact table.
    If we look at infocube itself, there are only a few requests (for
    example, 10). However, we do often delete and reload requests
    frequently. We understood that there should only be one partition per
    request in the aggregate (infocube is NOT set up for partitioning by
    other than request).
    We suspect the high number of partitions is causing come performance
    issues. But we don;t understand why they are being created.
    I have even tried deleting the aggregate (all aggregate F tables and
    partitions were dropped) and reloading, and we still see many many more
    partitions than requests. (we also notice that many of the partitions
    have a very low record count - many less than 10 records in partition).
    We'd like to understand what is causing this. Could line item
    dimensions or high cardinality play a role?
    On a related topic-
    We also have seen an awful lot of empty partitions in both the infocube
    fast table and the aggregate fact table. I understand this is probably
    caused by the frequent deletion and reload of requests, but I am
    surprised that the system does not do a better job of cleaning up these
    empty partitions automatically. (We are aware of program
    SAP_DROP_EMPTY_FPARTITIONS).
    I am including some files which show these issues via screen shots and
    partition displays to help illustrate the issue.
    Any help would be appreciated.
    Brad Daniels
    302-275-1980
    215-592-2219

    Ideally the aggregates should get compressed by themselves - there could be some change runs that have affected the compression.
    Check the following :
    1. See if compressing the cube and rolling up the aggregates will merge the partitions.
    2. What is the delta mode for the aggregates ( are you loading deltas for aggregates or full loads ) ?
    3. Aggregates are partitioned according to the infocube and since you are partitioning according to the requests - the same is being done on the aggregates.
    Select another partitioning characteristic if possible. - because it is ideally recommended that request should not be used for partitioning.
    Arun
    Assign points if it helps..

  • Index size per table

    Oracle 11.1.7.0
    We have partitioned, non-partitioned indexes.
    1. Is there a way to find index size per table. As break down by table and index name how much each index is taking and where space is being used.
    2. Also, Is there a way to find free space within an allocated index?
    Edited by: user628400 on Nov 26, 2009 12:13 PM

    Hello,
    To collect statistics about indexes you must VALIDATE it first then put the datas
    into a Table.
    So this is the way I use:
    1. Create a Table to collect the datas:
    create table my_index_stats (
    index_name varchar2(30),
    height number(8),
    del_lf_rows number(8),
    distinct_keys number(8),
    rows_per_key number(10,2),
    blks_gets_per_access number(10,2),
    btree_space number(12,0),
    used_space number(12,0),
    pct_used number(12,0)
    /2. Validate the Index
    validate index "<schema>"."<index_name>";3. Collect the datas
    insert into my_index_stats
    select NAME, HEIGHT, DEL_LF_ROWS, DISTINCT_KEYS, ROWS_PER_KEY,
    BLKS_GETS_PER_ACCESS, BTREE_SPACE, USED_SPACE, PCT_USED
    from INDEX_STATS;
    commit;Then, you query the Table MY_INDEX_STATS and the USED_SPACE gives you an idea (in Bytes) of the space used inside the index.
    The BTREE_SPACE gives you the size of the Index.
    So from BTREE_SPACE and USED_SPACE you can know the wastage space of your Index.
    Hope it can help,
    Best regards
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 26, 2009 10:02 PM

  • Maximum length of the table

    Hi,
    I created one table, in that table i have 101 field, total length of the table is 430, but i could not able to create 102nd field because it's saying total length of the table is exceed. How i can increase table length?

    The total length of the fields is limited to 1962 in case of Transparent tables.
    Please check if one of the following constraints is causing the problem
    <b>Constraints</b>
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.

  • Max columns per tables

    H,
    What is max number columns per table in database express edition ? I have requirement of creating a table with 100 columns but it seems database only accepts table with 94 columns.any way out ?

    Hi Hardy,
    Here's a quote from Oracle's SQL documentation:
    "The absolute maximum number of columns in a table is 1000. However, when you
    create an object table or a relational table with columns of object, nested table, varray,
    or REF type, Oracle Database maps the columns of the user-defined types to relational
    columns, in effect creating hidden columns that count toward the 1000-column limit."
    Where are you seeing the "94 maximum"?
    Andy

  • Feature Request | Allow custom metadata per table/column to be stored

    Someone please correct me if there's already a feature that allows this...
    I'd like to see a feature where you can define a set of metadata that can be stored per table / column, and perhaps a trigger that updates that metadata.
    As a use case, it is sometimes necessary to find out how many records exist in a table, and the typical way of doing this is by running a statement like select count(*) from example_table;. With a large table, this statement might take a long time though, and certainly has overhead associated with it. If this is something that's done on a regular basis, like maybe even once every minute, wouldn't it be much better to store this number as metadata for the table that can be updated on inserts and deletes and then can be queried? It might involve extra overhead on an insert or delete statement to add to or subtract from this number, but then for some applications the benefit of getting the count quickly might outweigh the extra overhead.
    Another use case is finding a minimum or maximum out of a table. Say you store a date and you need to find the max value for some feature in your application; with a large table, and especially if its a date with accuracy to the millisecond where an index wouldn't help much because most values are unique, it can take quite a bit of time and overhead to find that max value. If you could define for that column that you'd like to store the max value in metadata, and could query it, it would be very quick to get the info. The added overhead in this scenario would be on insert, update or especially on delete, the value would have to be updated. But in some applications, if you don't expect alot of deletes or updates on this column, it might be worth the added overhead to be able to quickly find the max value for this column.
    I know you could probably make a separate table to store such info, and write triggers to keep it up to date, but why not have a built in feature in Oracle that manages it all for you? When you create a table, you could define with the column definition something like 'METADATA MAX' and it will store the max value of that column in metadata for you, etc.
    I know that the overhead of this feature wouldn't be good for most circumstances, but there certainly are those cases where it would be hugely beneficial and the overhead wouldn't matter so much.
    Any thoughts?
    Can this be submitted as a feature request? Am I asking in the right place?
    (p.s. while you're at it, make a feature to mimic IDENTITY columns from SQL Server!)

    I don't think what you mentioned is exactly what I was talking about. There's no min_value or max_value in the dba_tab_columns table; there's only high_value and low_value, and they are stored in binary. And I believe to be accurate in the use cases that I suggested, you would have to analyze the table after every insert/update/delete. So no, that's not the same feature I've asked for, although I appreciate the feedback.
    Also, the num_rows in dba_tables relies on the table being analyzed too, so for a table that stores temporary date to be processed where you want to know the size of the queue every few seconds, it wouldn't make sense to analyze the whole table every few seconds when all you want is a count of the records, and it's also inefficient to use the COUNT function with every query when it would be much faster to store the count in some metadata form that is updated with every insert or delete (adding to a count and subtracting from a count with each insert/delete is WAY faster than analyzing the table and letting it literally recount the entire table every time).
    So again, while I appreciate the feedback, I don't think what you mentioned addresses either of the use cases I gave. I'm talking about a different kind of user defined metadata that could be stored per table/column with rules to govern how it is updated. Not you standard metadata that requires an analyze and isn't real time. I also only gave a few use cases, but the feature I'm really looking for is the ability for users to define many different types of custom metadata even maybe based on their own logic.
    Again, this feature could be implemented right now by creating a USERMETADATA table for every standard table you have, and then using triggers to populate the info you want at the table level and column level, but why do that when it could be built in?
    Also, I don't really agree that having to create a trigger/sequence for every table instead of setting a column as IDENTITY is better. It's cumbersome. Why not build these commonly used features in? It can create a trigger/sequence behind the scenes for all I care, but why not at least let someone mark a column as IDENTITY (or use whatever other term you want) at the time of table creation and let it do everything for them. But that's off-topic; I meant it for more of a side comment, but should really have a separate post about it.

  • Partitioning in table.

    Hello,
    In my company we have a ERP system. In which we have a Finance Module . One of the table in it keeps the record of the accounting year (ex- 08-09,09-10 or 10-11). Now my senior has given me a task to partition that table as per the accounting year. Should i use range partitioning ? give me some idea which will be the best thing to use here ....if you need anymore details , can ask me ....Thanks !!!
    Oracle 10g R2
    Windows server 2005

    First question that you should ask is why you want to use partitioning ?
    What are your goals ?
    They can be (from http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/schemaob.htm#CFAGCECI):
    >
    Increased availability
    The unavailability of a partition does not entail the unavailability of the object. The query optimizer automatically removes unreferenced partitions from the query plan so queries are not affected when the partitions are unavailable.
    Easier administration of schema objects
    A partitioned object has pieces that can be managed either collectively or individually. DDL statements can manipulate partitions rather than entire tables or indexes. Thus, you can break up resource-intensive tasks such as rebuilding an index or table. For example, you can move one table partition at a time. If a problem occurs, then only the partition move must be redone, not the table move. Also, dropping a partition avoids executing numerous DELETE statements.
    Reduced contention for shared resources in OLTP systems
    In some OLTP systems, partitions can decrease contention for a shared resource. For example, DML is distributed over many segments rather than one segment.
    Enhanced query performance in data warehouses
    In a data warehouse, partitioning can speed processing of ad hoc queries. For example, a sales table containing a million rows can be partitioned by quarter.

  • Do i need to partition the table...?

    hi,
    i have a table which is having the following fields, the average entry expected into this table is nearly 25000 rows per month. and it will be queried daily based on shift_date, shift, and machine.
    do i need to partition this table. if yes how or on which fields i need to to this....?
    BOOKING_REFNO,
    PONUMBER,
    SHIFTDATE,
    OPER_ID,
    MACHINE,
    SHIFT,
    STATUS,
    JOB_HRS,
    JOB_START,
    JOB_END,
    ORD_QTY,
    YIELD_QTY,
    SCRAP_QTY,
    OPER_SEQ,
    CONF_TYPE,
    POSTATUS_REF,
    SHIFT_STATUS,
    COMB_REFNO,
    COMBINED,
    SHIFTAUTOSTAT,
    REASONCODE,
    REASON,
    CONF#
    thanks in Adv
    Kris

    I wouldn't go for partitioning table for 25,000 rows by month. Just a though.
    Anyway, the partitioning question cannot be take in 5 minutes, you should ask yourself why you want it (do you have to archive "old" rows ?), study, benchmark...
    But first of all, the reading of the following article may help you before choosing to go in partition, and choose how use it : Partition Decisions
    In all cases, we cannot answer on which column you have to partition table, we don't know application queries and what are the "key" column(s) (which you should know before decide).
    Nicolas.
    PS : partition is an option of Entreprise Edition with additional fee (an other point to take in account).

  • Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Thanks Kelly,
    The answers would be the following:
    1200 cells per custom section (NEW COUNT), and up to 30 custom sections per spec.
    Assuming all will be populated, and this would apply to all final material specs in the system which could be ~25% of all material specs.
    The cells will be numeric, free text, drop downs, and some calculated numeric.
    Are we reaching the limits for UI performance?
    Thanks

  • Top 3 maximum values in a table

    Dear Friends,
    I'm just looking for a query to get the top 3 maximum values from a table. For example is a table contains the salary of employees, I would like to get the top 3 maximum salary. Can you please help?
    Thank you in advance.
    Regards,
    Senthil .A. Perumal.

    here is a basic sample:
    select emp_id, sal from employee;
        EMP_ID        SAL
           101       2000
           103       1500
           102       2500
           104       3000
           105       2800
           106       3500
           107       2100
    7 rows selected.
    select emp.emp_id, emp.sal, emp.ranking
    from (select emp_id, sal, rank() over (order by sal desc) ranking
          from   employee) emp
    where ranking <= 3;
        EMP_ID        SAL    RANKING
           106       3500          1
           104       3000          2
           105       2800          3hope this helps.

  • Problem while partitioning The Table

    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish

    Looks like you don't have partition license or don't have a complete install of Oracle version 8.0.5. The best way to check is do a sqlplus user/passwd and look for a message that said "Production with the Partitioning and objects options" to appear before the SQL> prompt. Hope this helps....
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rkumar:
    create table Employee ( empno number(3), name varchar2(10), deptno number(4))
    partition by range(deptno)
    (partition p1 values less than(11),
    partition p2 values less than(21),
    partition p3 values less than(31));
    create table Employee (
    ERROR at line 1:
    ORA-00439: feature not enabled: Partitioning
    Please help me for solving this problem and send me the details I need to partition my table.
    Thanks in advance.
    w.regards
    R.Satish <HR></BLOCKQUOTE>
    null

  • Limit on the number of partitions a table can have

    Hi,
    It's been quite some time I'm thinking of a simple and the best solution to a performance issue in my application. Benefiting out of partitioning the table seems a simplest approach; it involves very minimal changes to my application code and in addition, it keeps the overall application logic 100% intact. However, at times, the number of partitions required can grow to as large as 500 thousand. I know of another application implementing as many as 50 thousand partitions for one of its tables. I'm wondering if Oracle recommends or poses any limit to a number of partitions the table can have. How does that limit, if it exists, vary if each of my table partition holds only a small amount of data; say, not more than 2 thousand records each of 1 KB size. What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    Any inputs on this would be a great help.
    Thanks,
    Aniruddh
    ps: Consider Oracle releases 10g onwards.
    Edited by: Aniruddh on Dec 30, 2009 9:46 AM
    Edited by: Aniruddh on Dec 30, 2009 9:50 AM

    Aniruddh,
    >
    What are the important considerations that one needs to keep in mind while creating the huge number of partitions for a table?
    >
    I doubt if you are using partitioning for the right causes. Please explain how is your data structured and why you need to create so many partitions..?
    when creating partition, you need to consider..
    a) why you need to partition?
    b) how is your data structured
    c) how your data is indexed.
    d) What kind of queries would you firing on this table to get the data. Will they use the partition key ?
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • PL/SQL- Problem in creating a partitioned fact table using select as syntax

    Hi All,
    I am trying to create a clone(mdccma.fact_pax_bkng_t) of existing fact table (mdccma.fact_pax_bkng) using dynamic pl/sql. However, pl/sql anonymous block errors out with following error:
    SQL> Connected.
    SQL> SQL> DECLARE
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1608
    ORA-06512: at "SYS.DBMS_SQL", line 33
    ORA-06512: at line 50
    Here is pl/sql block:
    -- CREATING FPB_T
    DECLARE
    v_owner VARCHAR2(32) := 'MDCCMA';
    v_table_original VARCHAR2(32) := 'FACT_PAX_BKNG';
    v_table VARCHAR2(32) := 'FACT_PAX_BKNG_T';
    v_tblspc VARCHAR2(32) := v_owner||'_DATA';
    CURSOR c_parts IS SELECT TABLESPACE_NAME, PARTITION_NAME,HIGH_VALUE, ROW_NUMBER() OVER (ORDER BY PARTITION_NAME) AS ROWNUMBER
    FROM USER_TAB_PARTITIONS
    WHERE TABLE_NAME = v_table_original
    ORDER BY PARTITION_NAME;
    v_cmd CLOB := EMPTY_CLOB();
    v_cmd3 varchar2(300) := 'CREATE TABLE ' ||v_owner||'.'||v_table||' TABLESPACE '||v_tblspc
    ||' NOLOGGING PARTITION BY RANGE'||'(' ||'SNAPSHOT_DTM '||')' ||'(';
    v_part VARCHAR2(32);
    v_tblspc_name VARCHAR2(32);
    v_row number;
    v_value LONG;
    v_tmp varchar2(20000);
    v_cur INTEGER;
    v_ret NUMBER;
    v_sql DBMS_SQL.VARCHAR2S;
    v_upperbound NUMBER;
    BEGIN
    v_cmd := v_cmd3;
    OPEN c_parts;
    FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
    WHILE c_parts%FOUND
    LOOP
    IF (v_row = 1) THEN
    v_tmp := ' PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
    ELSE
    v_tmp := ', PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
    END IF;
    v_cmd := v_cmd || v_tmp;
    -- DBMS_OUTPUT.PUT_LINE(v_cmd);
    FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
    END LOOP;
    -- DBMS_OUTPUT.PUT_LINE('Length:'||DBMS_LOB.GETLENGTH(v_cmd));
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';
    v_upperbound := CEIL(DBMS_LOB.GETLENGTH(v_cmd)/256);
    FOR i IN 1..v_upperbound
    LOOP
    v_sql(i) := DBMS_LOB.SUBSTR(v_cmd
    ,256 -- amount
    ,((i-1)*256)+1 -- offset
    END LOOP;
    v_cur := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(v_cur, v_sql, 1, v_upperbound, FALSE, DBMS_SQL.NATIVE);
    v_ret := DBMS_SQL.EXECUTE(v_cur);
    CLOSE c_parts;
    DBMS_OUTPUT.PUT_LINE(v_cmd);
    -- EXECUTE IMMEDIATE v_cmd ;
    END;
    The above pl/sql creates a DDL for partitioned fact table(new) based on an existing fact table and get executes through CLOB.
    Please look into the issue and let me know any changes or modifications/suggestions that are required to fix the issue. Any help is appreciated.
    Thank You,
    Sudheer

    Think this is your problem:
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';Remove the SQL terminator ';' ... dynamic SQL doesn't require it, try this instead:
    v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2';Thanks
    Paul

  • Partitioning of table in oracle 10g - How to Add

    Hello Friends ,
    Hope you are all fine and doing great.
    By the way - I have a quick question on oracle 10g Partitioning of tables...
    I have a table with partition as stated below ..
    CREATE TABLE X_ACC_ASSETS_GPC_AGG
    X_ACC_ASSETS_GPC_AGG_RK NUMBER(10) NOT NULL,
    X_AS_OF_DT DATE NOT NULL,
    ACCOUNT_RK NUMBER(10) NOT NULL,
    X_UNIV_ACCOUNT_ID NUMBER(10),
    ACCOUNT_ID VARCHAR2(10 BYTE),
    X_ASSET_TYPE_CD VARCHAR2(6 BYTE),
    X_AUC_AMT NUMBER(18,5),
    X_FIRM_AMT NUMBER(18,5),
    X_ADJ_SRCE_AMT NUMBER(18,5),
    PROCESSED_DTTM DATE
    )PARTITION BY RANGE (X_AS_OF_DT)
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P201112
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION PMAX
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    )NOPARALLEL;
    My question is :
    1) How to add a partition say P201201 ..
    Since I have already stated PARTITION PMAX can I still add partition?
    2) Can I add partition even though the table has data ?
    ==========================
    I tried to add partition ..say
    ALTER TABLE X_ACC ADD PARTITION P201201 VALUES LESS THAN
    (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    but getting the error ..
    "partition bound must collate higher than that of the last partition"
    Thanks/kumar

    You have partitions
    200712
    200812
    200912
    201012
    201112
    PMAX.
    so your condition for partition p201112 is '201012-01-01' to '201112-01-01' i.e the values between these two dates will be in partition p201112. and then everything else will be in PMAX. So now you are splitting your pmax.
    alter table X_acc split partition pmax at ( to_date('2012-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') )
    into (partition p201201, partition pmax); The condition you have to change. I just showed as an example. It could be the date range between two dates or it could be greater than a date value. It is upto how you want this new partition.
    how to add partition between two partition
    Edited by: pransuj on Mar 25, 2011 11:13 AM
    Edited by: pransuj on Mar 25, 2011 11:14 AM

Maybe you are looking for

  • Can someone please help? Show/Hide layers

    Hi there, I am making a site for a friend and am having some weirdness that I can't figure out. I have a series of layers that show/hide based on various selections. Nothing complicated by any means. I am using the Dreamweaver Show-hide layers functi

  • Roxio Media Manager - 8830

    I just got  8830 (VZN) I have DM version - 4.3 and device software V 4.2.2.176 When I open up Roxio Media Manager. The Application recognizes my device folders , but not my media card. I have a SD 2GB media in my device. Any suggestions?

  • Saving files larger than 2gb in Photoshop CC

    I'm working with a large file for print and it's 2.07G with layers, and I'm getting the error when attempting to save the file that it's over the 2GB maximum.  I'm not seeing .psb in the dropdown menu for saving large files.  Any guidance on how to g

  • Account Address view on BP_FACTSHEET Factsheet

    Hi , I have a requirement for factsheet where I need to get the Acoount address view to the BP_FACTSHEET Component of the factSheet which is not available in the standard views of the factsheet. plz can any one help me to  in this regards . thanks an

  • Searching for clean code

    Please help the ignorant... I know there has to be a cleaner way to do this. First of all, if you have a date field that is empty, the database records 1900-01-01 00:00:00.0. So...i certainly dont need to show this in my form. Secondly, i know there