Problem while dropping partitions

Hi All,
I'm using oracle 11g. I have 2 tables A and B. A is the master table and B is the child table. Both the tables are partitioned based on month. Now when i have to drop partition for previous month, i first drop partition from table B then from table A. With table B the partition is getting dropped successfully. But when i try to drop partition for A it gives an error as it is a master table. Table A does not have any data in the partitioned to be dropped that is being referenced by table B. How do i drop the partition for master table.
Thanks in Advance

Hi,
There may be Chance of Have some rows .. just find out the rows existing in the partition of master table with existence of records in Child table that makes it clear clarificaiton...
- Pavan Kumar N

Similar Messages

  • Problem while dropping a table

    Dear All,
    I am facing a problem while dropping a table in Oracle 10g.
    I am able to find the number of records in the table but unble to delete it.
    SQL> select count(*) from merchant_audit;
    COUNT(*)
    30028278
    SQL> drop table merchant_audit;
    drop table merchant_audit
    ERROR at line 1:
    ORA-00942: table or view does not exist
    I have to drop this table from the database. Please help.
    regards,
    Santhosh

    Hi,
    IS it a table ? Is it your table ?
    Read this example :
    sqlplus scott/*****
    SQL> create table merchant_audit(col1 number);
    Table created.
    SQL> create public synonym merchant_audit for merchant_audit;
    Synonym created.
    SQL> grant select on merchant_audit to merchant;
    Grant succeeded.
    SQL> conn merchant/merchant
    Connected.
    SQL> select count(*) from merchant_audit;
    COUNT(*)
    0
    SQL> drop table merchant_audit;
    drop table merchant_audit
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL>
    See owner into the dba_tables, and if synonym into dba_synonyms.
    Nicolas.
    Message was edited by:
    Nicolas Gasparotto

  • Problem while dropping snapshot

    Dear sir
    I am a junior dba, now I have a problem while I drop a customerinfo snapshot from Oracle 9.2.0.4 database. It seem to be the snapshot has been dropped correctly. But I found it's still remained in user's schema and looks like normal table.
    I tried to drop it again but I got error ORA-12083: must use DROP MATERIALIZED VIEW to drop "customerinfo". But when I used command DROP SNAPSHOT CUSTOMERINFO; and DROP MATERIALIZED VIEW CUSTOMETINFO; It's still error ORA-12003 : materialized view "CUSTOMERINFO" does not exist.
    Please give me some advice.
    PS. Our system is Linux RHAS3 and Oracle 9.2.0.4 Database.

    It could be that the MV was created on a prebuilt table.
    If that is the case, the table must be dropped separately.
    First make sure that you actually want to drop the table and lose the data.
    Look for 'PREBUILT' under 'CREATE MATERIALIZED VIEW' in the docs.

  • Problem while dropping tablespace

    Hi all,
    I am getting following error while i am trying to drop tablespace
    ORA-02449: unique/primary keys in table referenced by foreign keys.
    I am using followin statement to drop tablespace;
    drop tablespace QAREF430 including contents and datafiles;
    wat might be the problem?
    Thanks.

    wat might be the problem?You have some referential integrity constraints, outside QAREF430 tablespace, pointing to a table inside QAREF430 tablespace. Try
    drop tablespace QAREF430 including contents and datafiles cascade constraints;

  • Problem while dropping a .JSFF onto .JSPX page

    Hi All,
    I have a very simple BTF with just an output text filed and a blank Main page (.JSPX) . Whenever I am trying to drop.JSFF on to .JSPX. it prompts me for an component Identifier. I dont know what to put in that Prompt.Please help me. I am struck
    Thanks

    Got my problem resolved ... Was creating the JSFF with Facelets , changed it to XML and my thing resolved

  • Problem in Dropping Constraints..

    Hi All,
    I am facing problem while dropping and recreating constraint.Requirement is i have table there is 4 check(C) type constraint and all are having different search condition.I need to alter table and drop one of them C type constraint and again recereate it.
    select * from user_constraints where constraint_type='C' AND TABLE_NAME='xyz'
    It will return multiple rows.
    when i do
    select * from user_constraints where constraint_type='C' AND TABLE_NAME='xyz' and search_condition = 'V_PARAM_CDE IN ''(''F_RECEP_PATCH'', ''NLS_LANGUAGE'')'
    its throwing error : ORA-00997 illegal use of long datatype
    Now i am not able to drop and recreate constraint.I need to write a script and through script need to drop and recreate it.
    Please help me to sort out above problem.
    Thanks n advance.
    Anwar

    1) Rather than dropping and recreating a constraint, you're better off disabling and re-enabling it. Depending on what you're trying to do, you could also make the constraint deferrable and defer validation to the end of the transaction.
    2) Do you name your constraints? If not, could you? The easiest way to be able to uniquely identify a constraint is generally to give it an informative name.
    Justin

  • Partitioned nested table error while dropping one partition

    All,
    I created a partitioned table which is also a nested table as you can see below. I got FK constraint error while attempting to drop a partition, however, I could not find the FK in order to disable it since it's underlying table emp_list_p which is not visiable to applications. How could I drop the partition in this case?
    Thanks,
    Jianhui
    SQL>desc emp_t
    Name Null? Type
    ENO NUMBER
    ENAME VARCHAR2(30)
    SAL NUMBER
    SQL>desc emp_list_t
    emp_list_t TABLE OF EMP_T
    Name Null? Type
    ENO NUMBER
    ENAME VARCHAR2(30)
    SAL NUMBER
    SQL>l
    1 create table dept_p
    2 (dno number,
    3 dname varchar2(30),
    4 emplist emp_list_t )
    5 NESTED TABLE emplist store as emp_list_p
    6 partition by range (dno)
    7 (
    8 partition p1 values less than (2),
    9 partition p2 values less than (3)
    10* )
    SQL>/
    Table created.
    SQL>insert into dept_p (select * from dept);
    2 rows created.
    SQL>select * from dept_p;
    DNO DNAME
    EMPLIST(ENO, ENAME, SAL)
    1 HR
    EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000))
    2 SALES
    EMP_LIST_T(EMP_T(3, 'frank', 800))
    2 rows selected.
    SQL>alter table dept_p drop partition p1;
    alter table dept_p drop partition p1
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL>l
    1 select constraint_name, constraint_type, table_name
    2 from user_constraints
    3 where r_constraint_name=(select constraint_name
    4* from user_constraints where table_name='DEPT_P' and constraint_type in ('P','U'))
    SQL>/
    no rows selected

    SQL> create type emp_t as object(
      2  ENO NUMBER,
      3  ENAME VARCHAR2(30),
      4  SAL NUMBER)
      5  /
    Type created.
    SQL> create type emp_list_t as table of emp_t;
      2  /
    Type created.
    SQL> desc emp_list_t
    emp_list_t TABLE OF EMP_T
    Name                                      Null?    Type
    ENO                                                NUMBER
    ENAME                                              VARCHAR2(30)
    SAL                                                NUMBER
    SQL> create table dept_p
      2  (dno number,
      3  dname varchar2(30),
      4  emplist emp_list_t )
      5  NESTED TABLE emplist store as emp_list_p
      6  partition by range (dno)
      7   (
      8   partition p1 values less than (2),
      9   partition p2 values less than (3)
    10   )
    11  /
    Table created.
    SQL> insert into dept_p values(1, 'HR',
      2  EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000)));
    1 row created.
    SQL>
    SQL> insert into dept_p values(2, 'SALES',EMP_LIST_T(EMP_T(3, 'frank', 800)));
    1 row created.
    SQL> select * from dept_p;
           DNO DNAME
    EMPLIST(ENO, ENAME, SAL)
             1 HR
    EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000))
             2 SALES
    EMP_LIST_T(EMP_T(3, 'frank', 800))
    SQL> alter table dept_p drop partition p1;
    alter table dept_p drop partition p1
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL> select constraint_name,table_name,constraint_type from user_constraints
      2  where table_name = 'DEPT_P';
    CONSTRAINT_NAME                TABLE_NAME                     C
    SYS_C008224                    DEPT_P                         U
    SQL> select index_name from user_constraints
      2  where table_name = 'DEPT_P';
    INDEX_NAME
    SYS_C008224
    SQL> select index_name,column_name from user_ind_columns
      2  where index_name = 'SYS_C008224';
    INDEX_NAME                     COLUMN_NAME
    SYS_C008224                    EMPLIST
    SQL>
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
    With the Partitioning, OLAP and Data Mining options
    If you look closely, there is a unique index on dept_p.  Oracle does not advertise it.
    One of the options is that you may have to delete the rows in the partition first,
    then drop the partition.

  • Problem in truncate/drop partitions in a table having nested table columns.

    Hi,
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table? IF I change column types from nested table to varray type, will it help?
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    Thanks in advance.

    >
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table?
    >
    Unfortunately you can't do those operations when a table has a nested table column. No truncate, no drop, no exchange partition at the partition level.
    A nested table column is stored as a separate table and acts like a 'child' table with foreign keys to the 'parent' table. It is these 'foreign keys' that prevent the truncation (just like normal foreign keys prevent truncating partions and must be disabled first) but there is no mechanism to 'disable' them.
    Just one excellent example (there are many others) of why you should NOT use object columns at all.
    >
    IF I change column types from nested table to varray type, will it help?
    >
    Yes but I STRONGLY suggest you take this opportunity to change your data model to a standard relational one and put the 'child' (nested table) data into its own table with a foreign key to the parent. You can create a view on the two tables that can make data appear as if you have a nested table type if you want.
    Assuming that you are going to ignore the above advice just create a new VARRAY type and a table with that type as a column. Remember VARRAYs are defined with a maximum size. So the number of nested table records needs to be within the capacity of the VARRAY type for the data to fit.
    >
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    >
    Sure - just CAST the nested table to the VARRAY type. Here is code for a VARRAY type and a new table that shows how to do it.
    -- new array type
    CREATE OR REPLACE TYPE ARRAY_T AS VARRAY(10) OF VARCHAR2(64)
    -- new table using new array type - NOTE there is no nested table storage clause - arrays stored inline
    CREATE TABLE partitioned_table_array
         ( ID_ INT,
          arra_col  ARRAY_T )
         PARTITION BY RANGE (ID_)
         ( PARTITION p1 VALUES LESS THAN (40)
         , PARTITION p2 VALUES LESS THAN(80)
         , PARTITION p3 VALUES LESS THAN(100)
    -- insert the data from the original table converting the nested table data to the varray type
    INSERT INTO PARTITIONED_TABLE_ARRAY
    SELECT ID_, CAST(NESTED_COL AS ARRAY_T) FROM PARTITIONED_TABLENaturally since there is no more nested table storage you can truncate or drop partitions in the above table
    alter table partitioned_table_array truncate partition p1
    alter table partitioned_table_array drop partition p1

  • GG replication for interval partitioned tables while issuing drop partition command

    Hi all, we have golden gate replication between two databses 1 and 2. table A in 1 and 2 is interval partitioned but the partition names are different. whats the best way to achieve GG replication using drop partition. We want to drop partition automatically in DB 2 if done in DB 1.

    Hi,
    In this scenario ypu would better to drop manually on both the database, especially for drop you could filter based on operation type and do it manually.

  • Primary Key Causing Problem in Interval Partition Exchange

    DB : 11.2.0.2
    OS : AIX 6.1
    I am getting the problem while exchanging data with interval partitioned table. I have a interval partitioned table and a normal staging table having data to be uploaded.
    Following are the steps i am doing.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    Table created.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    Table altered.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    1 row created.
    SQL> commit;
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS  
    SYS_P98 partition is added to table automatically.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4));
    Table created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    1 row created.
    SQL> commit;
    Commit complete.
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    Table(s) Locked.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITIONNow, if i disable/drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    Table altered.
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
            30          3 21-MAY-13       2000         12
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    no rows selectedPlease suggest.

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

  • Ora-00604,ora-01422 error while dropping the table

    Hi gurus,
    I am using Oracle 10g R2 on windows 2000 platform,while dropping the table the following error occured.
    ORA-00604 : error occurred at recursive sql level 1.
    ORA-01422: exact fetch returns more than requested number of rows.
    Need urgent help.
    Thanks in advance

    Is there an AFTER EVENT trigger defined on this database? Can you check that?
    Secondly, was this database migrated from earlier version? I remember having seen this problem on 9i (it was 9.2.0.1 or 9.2.0.2; I can't recall exactly).

  • Error occurred while deciding partition number,when activating DSO data.

    HI all,
    I have 2 requests in my DSO,when i activated the data for the 1 request manually it worked fine.But when activating the 2 nd request.It failed giving me the following error.
    Error occurred while deciding partition number,
    PSA update failed
    Process 000002 returned with errors
    Process BCTL_D4A4RYBAVI2HZ9FAMIP9TNMAI could not be terminated. Terminate manually
    Data pkgs 000001; Added records 1-; Changed records 0; Deleted records 0
    Log for activation request ODSR_D4A4RYBAVI1QAN3JAZ9NR880Q data package 000001...000001
    Errors occured when carrying out activation
    Analyze errors and activate again, if necessary
    Activation of M records from DataStore object 0FIGL_O02 terminated
    Report RSODSACT1 ended with errors
    Job cancelled after system exception ERROR_MESSAGE
    Please advice on how to resolve this issue.thanks in advance

    Hi Shambhu,
    thanks for your reply.
    I tried activating again.but it failed.Problem is it has about 10 mil records and this load is very important to be done within next 12 hours.
    I had deleted a PSA request but when i looked into the table RSTSODSPART,i have a PSA request not checked for Deletion flag.I am not sure why this happened.Does this have anything to do?But i also have another question,if i load from PSA was successful,i dont see a point as why the second load would error out.In that case is there anyway to delete one particular entry in that table.
    Please advice

  • Stereo Audio Record problem (While recording video as well)

    Hi,
    I just just bought Sony Xperia C3 dual yesterday. I'm having problem with audio recording. I installed the Sony audio recorder from Google play store but while recording in stereo mode with it the gain suddenly drops after 1/2 second(s). Same problem while recording a video with stock camera app as well, video quality is fine but the audio with it is,just worst. Tried third party app like regorge pro but faced the same problem. Tried disabling the AGC with it, but no good. Recording in mono mode just works fine and I get clear record.
    Any solution?
    Thanks.

    @uliwooly  This one i recorded today morning. The audio starts good & clear at the begining but just after one second it drops & then you can hear the bus engine sounds like waterfall. Here is the youtube link https://www.youtube.com/watch?v=5H1jNxyYMlw Here's another video uploaded by a review site with the same problem https://www.youtube.com/watch?v=z3vKwydfN6U & more from youtube https://www.youtube.com/watch?v=-GLLj2ommP4  then i used a third party audio recorder with mic switch option https://www.youtube.com/watch?v=D6d4uAEZFRE as usual with the rear mic the gain suddenly drops after second & you can hear some weird sounds like a "movie bomb" sound at 00:04, "rattle snake" sound at 00:05 & 00:12 & with the front mic starts at 00:17 you can hear the difference. It's mono but so clear & sharp.  Finally, as i dont have the mic swith option while recording video, all videos i record will have the same problem. This is definitely not  the typical "sony" thing to carry on.

  • Problem while downloading  OS X Lion

    I have an annoying problem while downloading the OS X Lion at about 60-70 % of the download its says that my internet dropped out try again, i've try this many time and still the same problem at 60-70% of the download. What can i do any suggestion?
    thanks

    Do you have the Install Mac OS Lion.app in your /Applications folder?
    If so double-click to install.
    If you no longer have the download then go to MAS > Purchases tab, hold option and download again.

  • Drop partition without disabling foreign key

    Hi All,
    I have parent and child table.
    Parent table
    create table parent_1
    (id number,
    create_date date,
    constraint parent_1_pk001 PRIMARY KEY (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION parent_1_part VALUES LESS THAN ('01-JAN-2010'));
    Child Table
    create table child_1
    (id number,
    create_date date,
    constraint child_1_fk001 FOREIGN KEY (id)
    REFERENCES parent_1 (id))
    PARTITION BY RANGE (create_date)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (PARTITION create_date_part VALUES LESS THAN ('01-JAN-2010'));
    I am having problems dropping partition.
    Parent_1
    1     26-JUL-12
    2     26-JUL-12
    Child_1
    1     26-JUL-12
    alter table CHILD_1 drop partition SYS_P274;
    table CHILD_1 altered.
    ON DROPPING PARENT PARTITION
    alter table parent_1 drop partition SYS_P273;
    Error report:
    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause:    An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action:   Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can see what
    constraints are referencing a table by issuing the following
    command:
    SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
    PLEASE CAN I KNOW IF THERE IS ANY WAY TO DROP PARENT PARTITION WITHOUT DISABLE/ENABLE FOREIGN CONSTRAINTS
    Thanks

    SQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys"
    *Cause: An attempt was made to truncate a table with unique or
    primary keys referenced by foreign keys enabled in another table.
    Other operations not allowed are dropping/truncating a partition of a
    partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    *Action: Before performing the above operations the table, disable the
    foreign key constraints in other tables. You can't do that until you disable the foreign key constraint
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/
    Hope this helps
    Mohamed Houri
    www.hourim.wordpress.com

Maybe you are looking for

  • Send file as email not working when Outlook 2013 is default mail client

    Have Adobe Reader XI 11.0.2 installed.  Running Windows 7 Pro 64 bit with Office 2013 installed.  When I set Default E-mail Application to Microsoft Outlook from Preferences I receive the following error trying to send any file as an e-mail: "Either

  • Not working Manage bean

    Dear experts, Im using JDeveloper 11.1.2.2.0 I created manage bean for cetain command button in my jsf page. This is the code of MB: package common.model.view; import javax.faces.event.ActionEvent; public class abc { public abc() { public void getSel

  • ASM CREATE DISK FAILED

    i am getting this error while trying to create disk [root@dbanew sysconfig]# /etc/init.d/oracleasm createdisk VOL1 /dev/sda3 Marking disk "/dev/sda3" as an ASM disk: asmtool: Unable to clear device "/dev/sda3": Input/output error [FAILED] [root@dbane

  • Adobe Reader 8: How to stop automatic updates

    Today, I noticed that my system was trying to download 8.1.2. I did not request a check for updates. How do I disable the automatic downloading of updates? I loke thru Edit | Preferences and did not find any options to do so.

  • Ensuring Oracle caches an in() clause

    How do I post a select statement against Oracle that includes an IN(...) clause with varying lengths and make sure it gets cached in the SQL-Area. Joinig to a temporary tables seems too expensive to me since I must handle lots of HTTP-Sessions concur