Unable to partition RTRIM table

Hi Oracle professionals.

recently, we changed the data type of CHAR in VARCHAR2 column and table is the partition table,

After modification, we can not apply RTRIM for these tables. It gives an error message saying that it is impossible to change physical partitions.

same problem with the tables with constraints

Database is 11 GR 2

Thanks in advance

Concerning

REDA

If the update of the partition key is originally a movement of the different partition line then the table must be motion activated line.

Find out what...

SQL > create table temp
() 2
3 name varchar2 (100)
4, varchar2 (1) sex
5)
6 partition by list (gender)
() 7
8 partition p_m values (').
9 partition p_f values ("F"),
10 partition p_o values ('o')
(11);

Table created.

SQL > insert into temporary values ('kitsoukou',');

1 line of creation.

SQL > insert into values temporary ('anna', 'F');

1 line of creation.

SQL > insert into temporary values ('unknown', 'o');

1 line of creation.

SQL > commit;

Validation complete.

SQL > day sex set temp = am' where name = 'unknown ';
update of sex set temp = am' where name = 'unknown '.
*
ERROR on line 1:
ORA-14402: update of partition key column would cause a partition chang

SQL > drop table temp;

Deleted table.

SQL > create table temp
() 2
3 name varchar2 (100)
4, varchar2 (1) sex
5)
6 partition by list (gender)
() 7
8 partition p_m values (').
9 partition p_f values ("F"),
10 partition p_o values ('o')
11)
12 allow the movement of the line;

Table created.

SQL > insert into temporary values ('kitsoukou',');

1 line of creation.

SQL > insert into values temporary ('anna', 'F');

1 line of creation.

SQL > insert into temporary values ('unknown', 'o');

1 line of creation.

SQL > commit;

Validation complete.

SQL > day sex set temp = am' where name = 'unknown ';

1 line update.

If there is no such thing as the partition key...

SQL > day sex set temp = 'X', where name = 'unknown ';
update of sex set temp = 'X', where name = 'unknown '.
*
ERROR on line 1:
ORA-14406: partition update key exceeds plu legal partition key

Tags: Database

Similar Questions

  • Unable to draw the table 1 d with a cluster of 2 items on a XY Chart

    I am unable to draw a table 1 d with a cluster of 2 items on a XY Chart. The data displayed at the entrance in the graph, but nothing is drawn. I'm trying to draw a line connecting each point generated.

    You need a registry change on the inside of loops as well.

    But beyond that, you create too complicated a structure.  You create several plots of 1 point and not a single multipoint parcel.

    See attachment for the change that works.

  • Get an "Unable to locate required tables" error at startup

    Original title: unable to locate required tables

    I have windows 7 ultimate 32 bit. When I used my computer last night and stop it, everything was fine. But today morning when I start my PC, instead of the windows loading screen, I get the following message:

    "FATAL ERROR: unable to locate the tables needed to make adjustments." Press any key to continue initialization. "

    When I press a key, it gives a list of options to start windows in:

    (1) safe mode

    (2) safe mode with networking

    (3) safe mode with command prompt

    (4) last known good configuration

    (5) start windows normally

    When I choose the option 4 or 5, the windows of the loading screen (which says "STARTING WINDOWS") appears after which it hangs or restarts.

    When I choose option 1, it loads several files up to a named "CLASSPNP. SYS "(pas sûr dele de nom) after which it hangs or restarts." I tried to start my DVD win 7 to repair my installation but after loading the necessary files, it just reboots or freezes at the loading screen windows.

    My PC Config:

    Intel Dual Core 2.00GHZ

    3 GB RAM DDR2

    Seagate 160GB HDD

    DVD - RW drive LG

    Gigabyte motherboard with BIOS F5 v 945GCMXS2 (I've never risked updated my BIOS).

    I do not have any hardware changes since the last successful startup (which was yesterday). Kindly help me with this problem.

    Try this:
    1. put your BIOS so that it uses the DVD drive as its primary boot device.
    2 start the computer with the Windows 7 repair CD or with your Windows 7 installation DVD.
    3. press a button if you are prompted to start from the DVD.
    4. When prompted, select "Safe Mode Command Prompt".
    5 log in as administrator if you are prompted.
    6. Select repair when prompted.
    7. When you are prompted, select System Restore.
    8. set Windows to a point before this problem occurred.
    _________________________

    If this answer solves your problem, please click "Propose as answer" so that the thread can be closed. Thank you.

  • Deleted lines flashback: unable to read data - table definition has changed

    Hi all

    Its really Important.

    I unfortunately truncated a table using
    Trancate table mytable;

    and made an alter table to reduce the length of the pricision data.

    But I need back data of tabla

    I used the command to get the deleted lines, below, it shows error.

    query: select * from pol_tot versions between timestamp systimestamp-1 and systimestamp;
    error: ORA-01466: unable to read data - table definition has changed

    query: flashback table pol_tot to timestamp systimestamp - interval '45' minutes;
    error: ORA-01466: unable to read data - table definition has changed

    Well want to share your ideas how can I deleted thoose Records.

    Edited by: 887268 July 8, 2012 12:26

    This

    and Made a alter table to decrease data pricision length.
    

    is the cause of your error.

    Now please do what is obvious.

    -------------
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-01653: unable to extend the table SYS. ARGUMENT$ 13 in the SYSTEM tablespace

    I created the new database manually.

    When I @?/rdbms/admin/catproc.sql put this sql to execute.

    for some time he said created, granted. but after somewhere, it gives me the error.

    ORA-01653: unable to extend the table SYS. ARGUMENT$ 13 in the SYSTEM tablespace

    Please help me on this.

    Thank you in advance.

    Your query does not tablespace SYSTEM size. It provides a list of tablespaces. And may not be a complete list because I can't UNDO and TEMP tablespace. In all cases, based on the output, you have not created a user storage space, so all the tables you create in SYSTEM tablespace and finally you ran out of space. You need create user storage space if you don't have any. You want to change the non-system and non-system tablespaces value default tablespace users. Even if you don't have a non-system tablespaces, tables will be created in the tablespace default user unless you explicitly specify one. You must move the tables/indexes existing user for the non-system tablespaces.

    SY.

    PS to get the size of the SYSTEM tablespace, you will need to run:

    Select sum (bytes) / 1024/1024 tablespace_size_in_mb
    from dba_data_files
    where nom_tablespace = 'SYSTEM '.

  • Table partitioning on table MTL_SYSTEM_ITEMS_B?

    Hello

    We have an obligation to apply the partitioning on table MTL_SYSTEM_ITEMS_B. main reason is to improve the performance of queries.

    We planned to do with ORGANIZATION_ID column as the partition key.

    If anyone can share with your thoughts, what method of partition is good at this table to improve performance.

    Thank you

    Hello

    Please see these links/docs.

    Using partitioning of database with the E-Business Suite
    http://blogs.Oracle.com/stevenChan/2006/09/using_database_partitioning_wi.html

    Updated whitepaper: database, partitioning for E-Business Suite
    http://blogs.Oracle.com/stevenChan/2009/04/whitepaper_update_database_partitioning_for_ebusin.html

    Note: 554539.1 - database using partitioning with Oracle E-Business Suite

    Thank you
    Hussein

  • Partitioning of Tables/indexes

    Hello

    Oracle Version 10.2.0
    O/s Version: SUSE Linux

    Currently, all tables and indexes are stored in the ponit of NFS mounting. I would like to know if I can partition the tables/indexes on local storage temporarily.

    Thank you

    Hello
    Yes you can do it. But if you have a few scores on NAS and others on the local drive, then depending on the nature of the query/DML you will see some performance issues.

    MSK

  • Dynamically partition a table based on different values of a specific column: possible?

    I'll start by explaining my problem, so that you can have a global vision of the problem and perhaps suggest another solution. Problem: I have 2 tables with millions of records. Records are added daily, and so each row in each table has a column of "insertion_date".

    C1 C2 ... C10 insertion_date (type date, ofc)
    

    lines are cleaned according to the insertion_date parameter. This can happen in two ways:

    1 - whenever an application error appears. In this case delete is based on a single day and would be like:

    delete from T1 where insertion_date=##;
    

    in other words remove us the lines added and then restart the program (business logic, can't change it)

    2. every two weeks the data associated with these two weeks are deleted because will be most used:

    delete from T1 where insertion_date between ## and ##; (a two weeks period here)   
    

    Delete is currently very slow: it takes abot 8 minutes just to remove approximately 5 M of records (with the same insertion_date), I can't even imagine the time required to delete records more.

    So, here's my idea!

    I would partition my DB according to the value of insertion_date.

    To remove case 1 I would simply delete the partion associated with this insertion date, to remove scores of cases 2 associates at that interval.

    For the needs of my application at most 15 were leaving are present each time (maybe 20 if I want to keep last at least 5 days of data), so the documented limit of 64000 partitions is not a problem.

    Real problem is that I do not know insertion_date values in advance, so my question: is it possible to automatically create a new partition every time presents itself a new value of insertion_date?

    And please correct me if I'm wrong, if I accomplish partitioning that I wouldn't need to edit above right queries? I know just the faster removal time am I correct?

    No - it isn't bog standard range partitioning partitioning interval

    But perhaps you're citing 9i documentation for a reason?

    It is a feature of 11g... then only about 10 years.

    create table t1
    (col1  date)
    partition by range (col1) interval (numtodsinterval(1,'DAY'))
    (partition po values less than (to_date('01-01-2015','DD-MM-YYYY')));
    
    table T1 created.
    
    select table_name, partition_name, high_value from user_tab_partitions where table_name = 'T1';
    
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE
    ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    T1                             PO                             TO_DATE(' 2015-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    
    insert into t1
    select trunc(sysdate,'MM')+rownum-1
    from   dual
    connect by  rownum <= 10;
    
    select table_name, partition_name, high_value from user_tab_partitions where table_name = 'T1';
    
    TABLE_NAME                     PARTITION_NAME                 HIGH_VALUE
    ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    T1                             PO                             TO_DATE(' 2015-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    T1                             SYS_P450383                    TO_DATE(' 2015-07-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA...'
    T1                             SYS_P450384                    TO_DATE(' 2015-07-03 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450385                    TO_DATE(' 2015-07-04 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450386                    TO_DATE(' 2015-07-05 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450387                    TO_DATE(' 2015-07-06 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450388                    TO_DATE(' 2015-07-07 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450389                    TO_DATE(' 2015-07-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450390                    TO_DATE(' 2015-07-09 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450391                    TO_DATE(' 2015-07-10 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    T1                             SYS_P450392                    TO_DATE(' 2015-07-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA ...'
    
  • How to partition a table

    Hi all

    I use oracle 10g R2 64 bits on 64-bit windows server 2008.

    I am facing problem with a table, which seems to be supposed to be a table partitioned, because it expects the 80000 lines per year.

    This is the normal table for the table script

    create table Leave_Request (Leave_request_id number primary key,
                                              emp_id number references emp(emp_id) not null,
                                              leave_type_id number references leave_types(leave_type_id) not null,
                                              leave_apply_date date not null,
                                              leave_from_date date not null,
                                              leave_to_date date not null,
                                              remarks varchar2(3000));
    

    What is known, is that an index would be created to Leave_request_id automatically.

    now, my question is how to partition? How to create its index score?

    I read a few pages on the partitions and the notion of partitioning, but always confused with my situation.

    an example would be much appreciated.

    Thank you.

    First of all you must decide the column on which you want to partition in function. As you expect 80000 lines per year, you can partition it on the date column for example leave_apply_date with the partition of the RANGE.

    What is known, is that an index would be created to Leave_request_id automatically.

    No you need write explicitly create index statement to create indexes.

    now, my question is how to partition?

    Here is an example:

    CREATE TABLE sales_range

    (salesman_id NUMBER (5),)

    salesman_name VARCHAR2 (30),

    Sales_Amount NUMBER (10),

    Sales_Date DATE)

    PARTITION OF RANGE (sales_date)

    (

    PARTITION sales_jan2000 VALUES LESS THAN (TO_DATE('02/01/2000','MM/DD/YYYY')),

    PARTITION sales_feb2000 VALUES LESS THAN (TO_DATE('03/01/2000','MM/DD/YYYY')),

    PARTITION sales_mar2000 VALUES LESS THAN (TO_DATE('04/01/2000','MM/DD/YYYY')),

    PARTITION sales_apr2000 VALUES LESS THAN (TO_DATE('05/01/2000','MM/DD/YYYY'))

    );

    How to create its index score?

    Just add keyword LOCAL at the end of the create index example statement

    CREATE INDEX abc_ix_01 ON test (last_update_time) LOCAL app_index TABLESPACE;

    For more information, read Tables and partitioned indexes .

  • Partition of table reorganization

    Hello

    I have a pretty large table with the partition of the range. The person who ran a database before me, left huge amount of data in the default partition as existing partitioned filled and he did not create the new partition. Now, I'm putting together this table. The default partition has about 70 million lines. I want to know what will be the most effective way to carry out this exercise? the table has a primary key, foreign key, and also some other indexes on that.

    In the test environment, I created new partitions. Data copied from the default partition in 6 temporary tables. Copy takes about 8 hours. Now, I'm debating if I should truncate data from default partition and move the lines of time tables created back into the new partitions by writing insert query? I know it's easier way out, but not the most effective way.

    Another option I'm considering is, use datapump to export the data from the partition and then import, but I have not tried this? Can you show me or direct me to an example where the datapump is used to export and import a partition.

    Oracle version: 11.2.0.3

    Operating system: SUN Solaris 10

    In the test environment, I created new partitions. Data copied from the default partition in 6 temporary tables. Copy takes about 8 hours. Now, I'm debating if I should truncate data from default partition and move the lines of time tables created back into the new partitions by writing insert query? I know it's easier way out, but not the most effective way.

    We cannot help you if you SHOW us what you have done rather than simply say.

    What is the table the original table DDL?

    What is the DDL of the new test table?

    What data is in each of 6 temporary tables?

    If each of 6 temporary tables has data belonging to a single NEW partition then just use EXCHANGE PARTITION.

    1. create 6 new partitions in the table

    2 make a swap partition between each of the 6 new partitions and the corresponding temporary table is not partitioned.

    Trade is expected to take less than a second because they are updates only data dictionary.

    See my response and code example in this thread

    https://community.Oracle.com/thread/3530260

  • Partitioning the table - range on data type (21, 7) number and varchar2

    Hello

    Database version:

    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Operating system: HP - UX nduhi18 B.11.31 U ia64 1022072414 unlimited-license user

    APP: SAP - ERP

    I have to the partition of the RANGE on UPDATED_ON or PROFILE is a table that has a structure below:

    Name Null?    Type

    -------------------- -------- --------------

    ------------------

    MANDT NOT NULL VARCHAR2 (9)

    MR_ID NOT NULL VARCHAR2 (60)

    PROFILE NON-NULL VARCHAR2 (54)

    NO_REGISTRE NOT NULL VARCHAR2 (30)

    INTERVAL_DATE NOT NULL VARCHAR2 (24)

    AGGR_CONSUMPTION NOT NULL NUMBER (21.6)

    MDM_VERS_NO NOT NULL VARCHAR2 (9)

    MDP_UPDATE_DATE NOT NULL VARCHAR2 (24)

    MDP_UPDATE_TIME NOT NULL VARCHAR2 (18)

    NMI_CONFIG NOT NULL VARCHAR2 (120)

    NMI_CONFIG_FLAG NOT NULL VARCHAR2 (3)

    MDM_DATA_STRM_ID NOT NULL VARCHAR2 (6)

    NSRD NOT NULL VARCHAR2 (24)

    REASON_CODE NOT NULL VARCHAR2 (9)

    QUALITY_FLAG NOT NULL VARCHAR2 (3)

    METHOD_FLAG NOT NULL VARCHAR2 (6)

    MSATS_UPDATE_DAT NOT NULL VARCHAR2 (24)

    MSATS_UPDATE_TIM NOT NULL VARCHAR2 (18)

    READ_STATUS NOT NULL VARCHAR2 (3)

    LEGACY_FLAG NOT NULL VARCHAR2 (3)

    CREATED_ON NOT NULL NUMBER (21.7)

    CREATED_BY NOT NULL VARCHAR2 (36)

    UPDATED_ON NOT NULL NUMBER (21.7)

    UPDATED_BY NOT NULL VARCHAR2 (36)

    CVERSNO NOT NULL VARCHAR2 (18)

    OLDER_MD_FLAG NOT NULL VARCHAR2 (3)

    TRANSACTION_ID NOT NULL VARCHAR2 (108)

    According to my knowledge, RANGE is better suited for the DATE or NUMBER. and partition INTERVAL is available on the DATE or number.

    PROFILE of column

    I havets is of type VARCHAR2. I know that again I can partition as Oracle convert internally to varchar2 in number when the data is inserted. But the INTERVAL is not possible.  However, so could you please suggest how RANGE partition on PROFILE?

    CREATED_ON column:

    It's the NUMBER with decimals. Could you guide me please?

    Please let me know if you need more information?

    See you soon

    Sameer

    I partitioned table as below:

    PARTITION BY RANGE

    (

    "CREATED_ON".

    )

    SUBPARTITION BY HASH

    (

    'PROFILE '.

    )

    SUBPARTITION TEMPLATE

    (

    TABLESPACE SUBPARTITION 'PROF_SUB01"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB02"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB03"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB04"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB05"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB06"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB07"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB08"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB09"'PSAPISU."

    TABLESPACE SUBPARTITION 'PROF_SUB10' 'PSAPISU '.

    )

    (

    "BEF12_CP00" VALUES LOWER PARTITION TO (20120101000000),

    "JAN12_CP01" VALUES LOWER PARTITION TO (20120201000000),

    "FEB12_CP02" VALUES LOWER PARTITION TO (20120301000000),

    "MAR12_CP03" VALUES LOWER PARTITION TO (20120401000000),

    "APR12_CP04" VALUES LOWER PARTITION TO (20120501000000),

    "MAY12_CP05" VALUES LOWER PARTITION TO (20120601000000),

    "JUN12_CP06" VALUES LOWER PARTITION TO (20120701000000),

    "JUL12_CP07" VALUES LOWER PARTITION TO (20120801000000),

    "AUG12_CP08" VALUES LOWER PARTITION TO (20120901000000),

    "SEP12_CP09" VALUES LOWER PARTITION TO (20121001000000),

    "OCT12_CP10" VALUES LOWER PARTITION TO (20121101000000),

    "NOV12_CP11" VALUES LOWER PARTITION TO (20121201000000),

    "DEC12_CP12" VALUES LOWER PARTITION TO (20130101000000),

    "JAN13_CP13" VALUES LOWER PARTITION TO (20130201000000),

    "FEB13_CP14" VALUES LOWER PARTITION TO (20130301000000),

    "MAR13_CP15" VALUES LOWER PARTITION TO (20130401000000),

    "APR13_CP16" VALUES LOWER PARTITION TO (20130501000000),

    "MAY13_CP17" VALUES LOWER PARTITION TO (20130601000000),

    "JUN13_CP18" VALUES LOWER PARTITION TO (20130701000000),

    "JUL13_CP19" VALUES LOWER PARTITION TO (20130801000000),

    "AUG13_CP20" VALUES LOWER PARTITION TO (20130901000000),

    "SEP13_CP21" VALUES LOWER PARTITION TO (20131001000000),

    "OCT13_CP22" VALUES LOWER PARTITION TO (20131101000000),

    "NOV13_CP23" VALUES LOWER PARTITION TO (20131201000000),

    PARTITION 'OTHER_CPMAX' VALUES LESS THAN (MAXVALUE)

    )

    works very well.

  • What happens to the existing after the partition of table index and created with local index

    Hi guys,.

    / / DESC part id name number, varchar2 (100), number of wage

    In an existing table PART I add 1 column DATASEQ MORE. I wonder the part of table based on dataseq.now, the table is created with this logic of partition

    create the part table partition (identification number, name varchar2 (100), number of salary, number DATASEQ) in list (dataseq) (values partition PART_INITIAL (1));

    Suggestionn necessary. given that the table is partitioned based on DATASEQ I wonder to add local indexes on dataseq. to dataseq, I have added a local index create index idx on share (dataseq) LOCAL; Now my question is, already, there are the existing index is the column ID and salary.

    (1) IDX for dataseq is created locally so that it will be partition on each partition on the main table. Please tell me what is happening to the index on the column ID and salary... it will create again in local?

    Please suggest

    S

    Hello

    first of all, in reality 'a partition table' means create a new table a migration of existing data it (although, theoretically, you can use dbms_redefinition to partition an existing table - however, it's just doing the same thing behind the scenes). This means that you also get to decide what to do with the index - index will be local, who will be global (you can also reassess some of existing indexes and decide that they are not really necessary).

    Second of all, the choice of the partitioning key seems weird. Partitioning is a data management technique more that anything else, in order to be eligible, you must find a good partitioning key. A column recently added, named "data_seq" is not a good candidate. Can you give us more details about this column and why it was chosen as a partitioning key?

    I suspect that the person who proposed this partitioning scheme made a huge mistake. A non-partitioned table is much better in all aspects (including the ease of management and performance) that divided one wrongly.

    Best regards

    Nikolai

  • partition in maintained growth index, partition of table didn't need to add space.

    Version Oracle 11 g 1 material, OS is aix.

    We have a 100 to dataware house, are partitioned with the index.

    Each table move data 6 months previously and even with the index. However our table tablespace has not seen more, but index tablespace kept more and more, I have to keep adding spaces.

    How to address this issue? where to find the problem is?

    Thanks in advance.

    >
    I joined dba_segments with dba_objects to get nom_segment, owner, created, bytes/1024/1024 as this tablespace.
    . . .
    EVENT_TYPE_HGRAM_DEV STATS INDEX SUBPARTITION 28-SEP-05 DECEMBER 10 05
    1
    >
    Does not the validation of the application and the columns you listed do not match the data that you have posted.

    EVENT_TYPE_HGRAM_DEV - the name says a statistical histogram on the EVENT_TYPE table in the DEV environment. This object name means something to you?

    Enter you two dates but only "created" as a column. And what is the '1' represent?

    You also do not show an OWNER but mention a column 'owner '.

    Which table is, or has been, this index belong to? The table still exists? Have you purged the recyclebins?

  • Prevent specific users to drop the partition of table

    Hello

    I'm having the following problem: on the CUSTOMERS table, I implemented a policy that prevents specific users to delete records that have REPORT_DATE (it is a DATE column) over 2 months. Works very well.
    These users are actually "login" I identify using sys_context ('USERENV', 'OS_USER').

    However... I realized that these users can fall any partition of this table (the table partitioned BY RANGE) so the policy that I have implemented is unnecessary.

    My question: is it possible to prevent specific users to delete a partition?
    All partitions in the CUSTOMERS table are associated with a REPORT_DATE unique that's why I want to prevent the destruction of the wall that has a REPORT_DATE related more than two months...


    Thank you
    MR. R.

    Hello

    Revoke the privilege of the Oracle user who is connected. (privileges are granted to the and helped by users Oracle, no internal users that you identify well as SYS_CONTEXT.)

    If it is the owner of the schema, and then create a different pattern of all the newspapers-ins, which has only the privileges that these users must have. Modify the application so that it uses this log-in Oracle and not the owner of the table schema.

  • Join wise Partition 3 tables is possible?

    Hello
    I have two tables. One is an array of key-value (EAV model).
    The key-value table has a partitioning of reference through the reference to the main table, which is partionned by the time.
    I want to choose to select all entries in the main table with two specific value in the table "key-value. Because each value is a line, I need to join (or do a subquery) table of the value of key as many times as I have values to search.
    In my case, the query is:
        SELECT p.pdu_id
        FROM  pdu p
        INNER JOIN field_value fv  ON (fv.pdu_id = p.pdu_id   AND fv.field_id = 4)
        INNER JOIN field_value fv2 ON (fv2.pdu_id = p.pdu_id  AND fv2.field_id= 3)
        WHERE
            P.TIME     > to_date('11/21/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND P.TIME   < to_date('11/28/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND fv.value = '0xFFFFFF'
        AND fv2.value = 'aircraft'
    This query can also be written like this:
    SELECT p.pdu_id
    FROM
      (
        SELECT p.pdu_id
        FROM pdu p
        INNER JOIN field_value fv ON (fv.pdu_id = p.pdu_id AND fv.field_id = 4)
        WHERE
            P.TIME     > to_date('11/21/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND P.TIME   < to_date('11/28/2006 00:00:00','MM/DD/YYYY HH24:MI:SS')
        AND fv.value = '0xFFFFFF'
      )  p
    INNER JOIN field_value fv2 ON (fv2.pdu_id = p.pdu_id AND fv2.field_id = 3)
    WHERE fv2.value = 'aircraft'
    The two motions have comparable performance and explain the plan.
    This query takes time looooonnng... When I look at the plan to explain it and I can see that only a partition of Oracle 'p' access, only a score of "fv", but all the fv2 partition!

    An idea to make fv2 use only the right partition?

    Thanks in advance

    Published by: Thibault January 31, 2011 03:16

    Hello

    Try this and use an index on the column used for Assembly.

    SELECT / * + (p.pdu_id_idx) * / p.pdu_id of
    (select pdu_id from pdu, including TIME > to_date (November 21, 2006 00:00:00 "," MM/DD/YYYY HH24:MI:SS'))
    AND THE TIME< to_date('11/28/2006="" 00:00:00','mm/dd/yyyy="">
    (select pdu_id field_value where value = "0xFFFFFF" and field_id = 4) fv,.
    (select pdu_id field_value where value = "airplane" and field_id = 3) fv2
    where p.pdu_id = fv.pdu_id
    and p.pdu_id = fv2.pdu_id;

Maybe you are looking for