Add ON DELETE CASCADE

hi every body.
i want to add the constraint "ON DELETE CASCADE" on foreign key value in child table like.
ALTER table employee
Add CONSTRAINT cscade_dept_no ON DELETE CASCADE (Deptno)
but it display error message, so please help me in this regards.
Thanks
Edited by: BilalKhan on Feb 7, 2011 11:53 PM

Usually, will be usefull look the error displayed.
Example:
ALTER table employee Add CONSTRAINT cscade_dept_no ON DELETE CASCADE (Deptno);
Error SQL: ORA-00904: :
00904. 00000 -  "%s: invalid identifier"
*Cause:   
*Action:Then we can say to you... Your syntaxis is wrong, you must use
ALTER TABLE table_name
add CONSTRAINT constraint_name
FOREIGN KEY (column1, column2, ... column_n)
REFERENCES parent_table (column1, column2, ... column_n)
ON DELETE CASCADE;
example
ALTER TABLE employee
add CONSTRAINT cscade_dept_no
  FOREIGN KEY (Deptno)
  REFERENCES Department (Deptno)
  ON DELETE CASCADE;

Similar Messages

  • JPA - How can i add ON DELETE CASCADE constraint ?

    I have a three tables.
    1. A (name)
    2. B (name)
    and relationship(manytomany) table of A and B
    3. C (a_name,b_name)
    I am using 2 JPA entities@Entity
    public class A {
         @id
         String name;
         @ManyToMany
         @JoinTable(name="C",
                   joinColumns=@JoinColumn(name="a_name"),
                   inverseJoinColumns=@JoinColumn(name="b_name"))
         private List<B> bs = new ArrayList<B>();
         //getter setter methos
    }and@Entity
    public class B {
         @id
         String name;
         @ManyToMany(mappedBy="bs")
         private List<A> as = new ArrayList<A>();
         //getter setter methos
    }DDL of table C which is generated by JPA is something like thatCREATE TABLE C (
    "a_name" VARCHAR,
    "b_name" VARCHAR,
    CONSTRAINT "c_a_name_fkey" FOREIGN KEY ("a_name")
    REFERENCES a(name)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
    CONSTRAINT "c_b_name_fkey" FOREIGN KEY ("b_name")
    REFERENCES b(name)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
    )but i want to add constraint ON DELETE CASCADE* instead of ON DELETE NO ACTION_ in above relationship table C.
    how can i do this ?
    Thanks in advance.

    Right click the message and select Edit as New.

  • How to alter the constraint for on delete cascade

    Hi Guys,
    I have a table which has 5 level of child tables .But all the child tables have the foreign keys without on delete cascade.But I have to delete a data in the parent table .One method I thought to change the child table constraints to ON DELETE CASCADE then delete the record and after that again to change the constraints with out the ON DELETE CASCADE.Please let me know wheather these is possible or not .If not is there any other alternatives to achive this.
    Any suggestions would be highly appreciated.
    Thanks in advance
    Prafulla

    I think you need to drop and recreate your FKs.
    See my example here.
    create table TEST1
      id       NUMBER(12) not null,
      anything VARCHAR2(20)
    alter table TEST1
      add constraint PK_TEST1 primary key (ID);
    create table TEST2
      id2  NUMBER(12) not null,
      fk1  NUMBER(12),
      info VARCHAR2(50)
    alter table TEST2
      add constraint PK_TEST2 primary key (ID2);
    alter table TEST2
      add constraint FK_TEST2_TO_TEST1 foreign key (FK1)
      references TEST1 (ID);
    -- and here is the code when I add on delete cascade for FK
    alter table TEST2
      drop constraint FK_TEST2_TO_TEST1;
    alter table TEST2
      add constraint FK_TEST2_TO_TEST1 foreign key (FK1)
      references TEST1 (ID) on delete cascade;

  • Add a on delete cascade option

    Hello,
    the developer here ask me to add a "ON delete cascade" to some tables in the database. Some of them have around 30 child tables. I want to know how to do it. Is it just an alter table or I have to drop the foreing keys and re-create it?
    Thanks
    Jp
    I'm on Oracle 10.2.0.4 on windows 2008 x64

    Hi,
    I agree with Robert what he said, if you try to modify the constraint you will get the Issue
    ORA-02275: such a referential constraint already exists in the tableMODIFY CONSTRAINT clause can only modify the state of a constraint either Enable or Disable.
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

  • How do I delete cascade with a PL/SQL procedure?

    This script will create a PL/SQL procedure that deletes cascade. This is a post to contribute to the Oracle community. Take the code as is and test it before you use it in production. Make sure this is what you want.
    Procedure Delete Cascade (prc_delete_cascade)
    Description
    =============
    The principle is very simple. The procedure uses a table called TO_BE_DELETED to keep a list of records to be deleted. This
    table keeps the table name and the rowid of those records that need to be deleted. The procedure also uses a function called
    DELETE_BOTT_ROW which takes one record of the table and tries to delete it. If the deletion fails with a foreign key constraint
    violation, the function parses the SQL error message (SQLERRM) to get the name of the constraint. With the name of the constraint,
    the function finds the name of the child table, all the child records that have references to the parent table primary or unique key,
    and the parent key primary or unique key column name. Once the child records of the failed delete are identified, the function takes their table name and rowids
    and records them into the TO_BE_DELETED table by inserting records of their table name and their rowids. Al the records inserted also contain the level (which
    is 1 for the original records, 2 for child records, 3 for granchild records, etc.) and the sequence number of the order in wich they
    are recorded. This way, when the function picks up a record to be deleted, it takes the one with the highest level and the highest
    inserted sequence, or the "bottom" record. Once all the child records of the failed delete are appended to the TO_BE_DELETED table, it calls itself
    recursevely, and the function takes the record at the "bottom" of the table and tries to delete it. If it succeeds, it calls
    itself recursevely to delete the next record. If it fails, it goes and finds the child records as described before and once they are
    inserted into the TO_BE_DELETED table, it calls itself again recursevely to try to delete again the "bottom" record. All records
    that are successfully deleted are flagged as deleted usig the flag_del column so they are not pickt up again. Once all the (parent,
    child, grandchild, etc.) records are deleted, the procedure ends without commiting, giving the option to the user to commit or
    rollback deletions. The table TO_BE_DELETED is, at the end of the procedure, a list of all the records that were deleted, including their table names
    and the order in with they were deleted. The user then can review its content and decide to commit or rollback.
    Restrictions
    ============
    1. Single tables only. The procedure only takes one table name and a WHERE clause to identified the records to be deleted.
    2. Single columns only. Ther procedure only works with single-column primary, unique and foreign key constraints.
    3. Single schema only.
    4. Unpredictable results with circular references.
    drop table to_be_deleted purge;
    create table to_be_deleted
    (tname varchar2(30)       -- table name
    ,rid rowid                -- rowid
    ,lvl number               -- level: 1=parent, 2=child, 3=grandchild, etc.
    ,seq_ins number           -- sequence order of record inserted
    ,flg_del char             -- flag deleted: Y=record deleted
    ,seq_del number           -- global order of record deletion
    set serveroutput on size 1000000
    create or replace procedure prc_delete_cascade
    (p_tname varchar2  -- table name
    ,p_where varchar2  -- where clause identifying records to be cascade deleted
    is
      dummy         char;
      v_sqlcode     number;
      v_sqlerrm     varchar2(32767);
      v_param_val   integer := 0;
      v_sql         varchar2(4000);
      v_ret_cde     number;
      e_bad_params  exception;
      v_iter        number;
      v_plvl        number;
      v_seq_del     number;
      v_max_iter    number := 1000000000;
      function delete_bott_row
      return number
      is
        v_sql        varchar2(4000);
        v_ptname     varchar2(30);  -- parent table name
        v_ppkname    varchar2(30);  -- parent primary key constraint name
        v_ppkcname   varchar2(30);  -- parnet primary key column name
        v_prowid      rowid;
        v_crowid      rowid;
        v_ctname     varchar2(30);  -- child table name
        v_cfkname    varchar2(30);  -- child foreign key constraint name
        v_cfkcname   varchar2(30);  -- child foreign key column name
        v_ins        number;
        v_seq_ins    number;
        v_sqlerrm    varchar2(4000);
        v_sqlcode    number;
        e_const_viol exception;
        pragma exception_init(e_const_viol, -2292);
        e_max_iter_reached exception;
      begin
        v_iter := v_iter + 1;
        if v_iter >= v_max_iter then
          raise e_max_iter_reached;
        end if;
        dbms_output.put_line('- Iter '||to_char(v_iter));
        dbms_output.put_line('----------');
        dbms_output.put_line('- Starting function delete_bott_row');
        v_sql := 'select tname, rid, lvl, seq_ins from (select * from to_be_deleted where flg_del = ''N'' order by lvl desc, seq_ins desc) where rownum=1';
        --  dbms_output.put_line('- SQL: '||v_sql);
        execute immediate v_sql into v_ptname, v_prowid, v_plvl, v_seq_ins;
        dbms_output.put_line('- Selected row: table name: '||v_ptname||', level: '||v_plvl||', seq: '||v_seq_ins);
        v_sql := 'delete from '||v_ptname||' where rowid='''||v_prowid||'''';
        dbms_output.put_line('- SQL: '||v_sql);
        execute immediate v_sql;
        dbms_output.put_line('- Row deleted !!!');
        v_ret_cde := 1;
        v_seq_del := v_seq_del + 1;
        dbms_output.put_line('- Mark the row deleted');
        v_sql := 'update to_be_deleted set flg_del = ''Y'', seq_del = '||to_char(v_seq_del)||' where tname='''||v_ptname||''' and rid='''||v_prowid||'''';
        -- dbms_output.put_line('- SQL: '||v_sql);
        execute immediate v_sql;
        -- dbms_output.put_line('- Updated table to_be_deleted, row marked deleted');
        -- dbms_output.put_line('- End of iter '||to_char(v_iter));
        dbms_output.put_line('----------');
        -- call function delete_bott_row recursively
        v_ret_cde := delete_bott_row;
        return 0;
      exception
        when no_data_found then
          dbms_output.put_line('- Table to_be_deleted is empty, delete cascade has completed successfully.');
          v_ret_cde := 0;
          return 0;
        when e_const_viol then
          v_sqlcode := SQLCODE;
          v_sqlerrm := SQLERRM;
          v_ret_cde := v_sqlcode;
          dbms_output.put_line('>Constraint Violation. Record has children');
          -- dbms_output.put_line('Error code: '||to_char(v_sqlcode));
          v_cfkname := substr(v_sqlerrm,instr(v_sqlerrm,'.')+1,instr(v_sqlerrm,')') - instr(v_sqlerrm,'.')-1);
          dbms_output.put_line('>Child FK name: '||v_cfkname);
          select table_name, column_name
            into v_ctname, v_cfkcname
            from user_cons_columns
           where constraint_name=v_cfkname;
          dbms_output.put_line('>Child table name: '||v_ctname||'. FK column name: '|| v_cfkcname);
          select constraint_name, column_name
            into v_ppkname, v_ppkcname
            from user_cons_columns
           where constraint_name = (select r_constraint_name
                                      from user_constraints
                                      where constraint_name=v_cfkname);
          dbms_output.put_line('>Parent PK/UK name: '||v_ppkname||'. Parent PK/UK column: '||v_ppkcname);
          v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) '||
                   'select '''||v_ctname||''', rowid, '||to_char(v_plvl+1)||', rownum, ''N'' '||
                   'from '||v_ctname||' '||
                   'where '||v_cfkcname||' =any (select '||v_ppkcname||' from '||v_ptname||' where rowid =any (select rid from to_be_deleted where tname = '''||v_ptname||'''))';
          -- dbms_output.put_line('- SQL: '||v_sql);
          execute immediate v_sql;
          select count(*)
            into v_ins
            from to_be_deleted
           where lvl = v_plvl+1
             and tname = v_ctname
             and flg_del = 'N';
          dbms_output.put_line('>Found '||to_char(v_ins)||' child records which were added to table to_be_deleted');  
          v_ret_cde := delete_bott_row;
          return  v_ret_cde;
        when e_max_iter_reached then
          dbms_output.put_line('Maximum iterations reached.  Terminating procedure.');
          raise;
        when others then
          raise;
      end delete_bott_row;
    begin
      dbms_output.put_line('Beginning');
      dbms_output.put_line('================================');
      -- validate p_table
      begin
        select 'Y'
          into dummy
          from user_tables
         where table_name=upper(p_tname);
      exception
        when no_data_found then
        v_param_val := 1;
        dbms_output.put_line('Table '||p_tname||' does not exist.');
        raise e_bad_params;
      end;
      dbms_output.put_line('- Parameter p_tname validated');
      -- validate p_where
      begin
        execute immediate 'select ''Y'' from '||p_tname||' where '||p_where INTO dummy;
      exception
        when no_data_found then  -- where clause returns no records
          dbms_output.put_line('Record(s) not found.  Check your where clause parameter');
          v_param_val := 2;
          raise e_bad_params;
        when too_many_rows then  -- found multiple records means it is ok
          null; 
        when others then  --  any other records means where clause has something wrong.
          dbms_output.put_line('Where clause is malformed');     
          v_param_val := 2;
          raise e_bad_params;
      end;   
      dbms_output.put_line('- Parameter p_where validated');
      if v_param_val > 0 then raise e_bad_params; end if;
      v_iter := 0;
      v_plvl := 1;
      v_seq_del := 0;
      v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) select '''||upper(p_tname)||''', rowid, '||to_char(v_plvl)||', rownum, ''N'' from '||p_tname||' where '||p_where;
      dbms_output.put_line('- Inserting initial record');
      dbms_output.put_line('- SQL: '||v_sql);
      execute immediate v_sql;
      dbms_output.put_line('- Record(s) inserted');
      dbms_output.put_line('- Calling function delete_bott_row to delete last row of table to_be_deleted');              
      dbms_output.put_line('-----------------------------------');              
      v_ret_cde :=  delete_bott_row;
      -- dbms_output.put_line('- Back from function delete_bott_row');              
      -- dbms_output.put_line('Return code: '||to_char(v_ret_cde));              
      dbms_output.put_line('- End of procedure');              
    exception
      when e_bad_params then
        dbms_output.put_line('Bad parameters, exiting.');
    end;
    show errors
    spool prc_delete_cascade.log
    --  Call to the procedure
    exec prc_delete_cascade('xent','xent_id between 1669 and 1670')
    select tname "Table Name", count(*) "Rows deleted"
      from to_be_deleted
    group by tname;
    spool off
    set lines 120
    select *
      from to_be_deleted
    order by seq_del;
    prompt  Now commit or rollaback deletions.
    -- commit;
    -- rollback;Edited by: Rodolfo4 on Mar 23, 2011 10:45 AM

    Interesting.
    I see a few areas where this could be useful. Elimiating specific test records from a Test DB for example.
    Some comments:
    <li>Since this is a recursive logic you must add a stop criteria. In this case I would add a max iteration variable. If that one is reached, raise an error message and let the procedure stop with that error.</li>
    <li>The when others exception at the end should be removed completely</li>
    <li>The when others exception in the middle should be replaced by a specific exception that handles the -2292 error</li>
    <li>A list of tables where no record should be deleted could be usefull. If the logic would encounter such a table, it should also stop. This would be to prevent that data from some system critical tables could be deleted per accident.</li>
    <li>The reference from the FK constraint to the PK constraint should include the table name and if possible the owner (as long as you use user_* views the owner is always the same. But we could extend this to the ALL_* views). I never met a system where different tables have the identical FK constraint names, however just make this fool proof.</li>

  • Problem on DELETE CASCADE

    my following tables not allow me to delete the parent table student and the corperate recode in child table also get delete , why
    create table Student(       student_id  int(10) not null  ,       sure_name VARCHAR(25)  not null,       english_name Varchar(25) default null,       chinese_name varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci not NULL,       student_hkid  varchar(12) not null,       address varchar(100) default null,       mobile_No  varchar(15) default null,       home_Telephone  varchar(15) default null,       email    varchar(20) not null,       faculty  varchar(70) default null,       department varchar(100) default null,       local_student varchar(3) default 'No',       fresh_student varchar(3) default 'No',       fulltime_student varchar(3) default 'No',       first_Ustudent varchar(3) default 'No',        userIp  VARCHAR(45)  not NULL,       accessTime  VARCHAR(45)  not NULL,       primary key(student_id))TYPE=MyISAM CHARACTER set utf8; create table Student_financial_info(   student_id  int(10) not null,   grant_loan varchar(3) default 'No',   uploadfile  text default null,   notification_time varchar(10) default null,   father_name  varchar(25) default null,   father_HKID  varchar(12) default null,   father_Salary decimal(6,2) ,   father_live_together varchar(3),   mother_name  varchar(25) default null,   mother_HKID  varchar(12) default null,   mother_Salary decimal(6,2) ,   mother_live_together varchar(3),   1th_sibling_name  varchar(25) default null,   1th_sibling_HKID  varchar(12) default null,   1th_sibling_Salary decimal(6,2) ,   1th_sibling_together varchar(3),   2th_sibling_name  varchar(25) default null,   2th_sibling_HKID  varchar(12) default null,   2th_sibling_Salary decimal(6,2) ,   2th_sibling_together varchar(3),   3th_sibling_name  varchar(25) default null,   3th_sibling_HKID  varchar(12) default null,   3th_sibling_Salary decimal(6,2) ,   3th_sibling_together varchar(3),   4th_sibling_name  varchar(25) default null,   4th_sibling_HKID  varchar(12) default null,   4th_sibling_Salary decimal(6,2) ,   4th_sibling_together varchar(3),   addition_income Varchar(200) default null,   primary key(student_id ),   FOREIGN KEY(student_id) REFERENCES student(student_id) ON DELETE CASCADE ON UPDATE CASCADE)TYPE=MyISAM CHARACTER set utf8;

    HJava wrote:
    hi thank you!
    I change my table Engine under Mysql Query Browser, but Foreign Key settinis not action at all ( thank you you mention the foreign key is ignore), quite stronge for me, I have to drop the table and change the table engine to InnoDB in my create table code and run it under command line client,
    now, It work.
    are there any different to  use command line Client and Mysql Query Brower?
    thank you!Not really, other than appearance. But, the "GUI" might let you simply change the type of table on an already created database (I don't know, haven't tried it), unfortunately, that won't activate any foreign keys when changing a MyISAM to InnoDB (although it will destroy keys on an InnoDB when changing to MyISAM), as, like the above quote says, the keys are not only not used, they are not even stored. I.E. MySQL no longer even knows, nor cares, that you even attempted to create a foreign key for that table. So, you must drop and recreate the table, you can't simply "change" it. Although you could change it (if the GUI even does this) and then add the foreign key constraints.

  • FOREIGN KEY across 2 schemas with ON DELETE CASCADE

    I found I could define
    ALTER TABLE user2.foo ADD CONSTRAINT fk_bar bar REFEERENCES
    user1.foobar;
    if user1 hat granted SELECT and REFERENCES to users2.
    But what, if I want to have
    ALTER TABLE user2.foo ADD CONSTRAINT fk_bar bar REFEERENCES
    user1.foobar ON DELETE CASCADE;
    I made
    GRANT DELETE ON foo to users1
    as user2
    But I get ORA-02292 (child-record exists) if I delete a row in user1.bar wich ha s a related row in user2.foo
    Any idea what to do ?

    Sorry i made a mistakte in my test. It will allso work with ON DELETE CASCADE

  • Expdp seems to be inconsistent with multiple on delete cascade foreign keys

    Hi,
    I've raised an SR for this with Oracle already and am waiting for a reply but in the mean time i was hoping someone could give me a hint about something we're doing that is obviously wrong or if anyone else is aware of similar issues. The steps we are following are these:
    1) 10.2.0.4.0 source system on SLES10 - we are doing a full schema level export using
    FLASHBACK_TIME="to_timestamp(to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS')"
    This should guarantee us a consistent export of the schema at the closest SCN to that timestamp
    We get no errors during the export
    2) we copy that file to a destination box which is 11.2.0.3.1 on SLES10
    3) we import that file - all the table data loads fine and the row counts are the same as those in the export log.
    4) when datapump reached the FK constraints 6 of them woouldn't enable with 'parent keys not found'
    The 6 FK's in question are all on delete cascade references back to the same parent table, there are a further 3 child tables which also reference back to the same parent table (all on the same parent PK single column) which do enable OK. The parent rows are indeed not there. In live those rows no longer exist. It appears as if the extract has been don ehalf way between the parent being deleted and the children then being deleted - but i didn't think this would be possible with a 'consistent' datapump export?
    So my question is how is this possible?
    All i can think is:
    a) the tables are being extracted a slightly different scn's due to some datapump bug?
    b) on delete cascade actions are somehow in a different scn to the initial delete from the parent table (seems unlikely)
    Can anyone shed any light on this?
    Regards,
    Harry

    Hi Srini,
    Here you go:
    Export command
    DIRECTORY=pumpy2
    DUMPFILE=expdp_eltp_tp_prod_464.dmp
    logfile=expdp_eltp_tp_prod_464.log
    SCHEMAS=TP_PROD
    PARALLEL=2
    USERID=xx/xx
    STATUS=120
    FLASHBACK_TIME="to_timestamp(to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS')"
    first bit of log
    Export: Release 10.2.0.4.0 - 64bit Production on Monday, 20 August, 2012 11:14:54
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  parfile=expdp_eltp_tp_prod_464.par
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 147.6 GB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
    last bit of log
    . . exported "TP_PROD"."ASSET_RESTRICTION"                   0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_BLOB_TRIGGERS"                  0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_CALENDARS"                      0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_FIRED_TRIGGERS"                 0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_JOB_LISTENERS"                  0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_PAUSED_TRIGGER_GRPS"            0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_SCHEDULER_STATE"                0 KB       0 rows
    . . exported "TP_PROD"."QRTZ_TRIGGER_LISTENERS"              0 KB       0 rows
    . . exported "TP_PROD"."SQLN_EXPLAIN_PLAN"                   0 KB       0 rows
    . . exported "TP_PROD"."TPPRD_FUEL_SPLITS_BACKUP_STATS"      0 KB       0 rows
    Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
      /oracle/ELUMPS/flashback/ELTP_datapump/expdp_eltp_tp_prod_464.dmp
    Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 13:08:43
    import command
    impdp / directory=FROMLIVE transform=oid:n transform=segment_attributes:n remap_schema=TP_PROD:TP_INT_DEMO remap_tablespace=TP_DATA:tpcons_comp parallel=4 dumpfile=expdp_eltp_tp_prod_464.dmp remap_tablespace=temp01:temp
    First bit of log
    Import: Release 11.2.0.3.0 - Production on Mon Aug 20 18:04:43 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning option
    Master table "ORACLE"."SYS_IMPORT_FULL_03" successfully loaded/unloaded
    Starting "ORACLE"."SYS_IMPORT_FULL_03":  /******** directory=FROMLIVE transform=oid:n transform=segment_attributes:n remap_schema=TP_PROD:TP_INT_DEMO remap_tablespace=TP_DATA:tpcons_comp parallel=4 dumpfile=expdp_eltp_tp_prod_464.dmp remap_tablespace=temp01:temp
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
    last bit of log
    ORA-39083: Object type JOB failed to create with error:
    ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
    Failing sql is:
    BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 103, LUSER=> 'TP_INT_DEMO', PUSER=> 'TP_INT_DEMO', CUSER=> 'TP_INT_DEMO', NEXT_DATE=> TO_DATE('2012-08-20 11:40:08', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> '(sysdate + (1/(24*2))) ', BROKEN=>  FALSE, WHAT=> 'dbms_refresh.refresh(''"TP_PROD"."TP_LEVEL"'');', NLSENV=> 'NLS_LANGUAGE=''AMERICAN'' NLS_TERRITORY=''AMERICA'' NLS_CURRENCY=''$'' NLS_ISO_CURREN
    ORA-39083: Object type JOB failed to create with error:
    ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
    Failing sql is:
    BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 104, LUSER=> 'TP_INT_DEMO', PUSER=> 'TP_INT_DEMO', CUSER=> 'TP_INT_DEMO', NEXT_DATE=> TO_DATE('2012-08-20 19:08:56', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'sysdate + 1', BROKEN=>  FALSE, WHAT=> 'TP_PROD.SP_DELETE_MODEL_SCENARIO_DATA;', NLSENV=> 'NLS_LANGUAGE=''AMERICAN'' NLS_TERRITORY=''AMERICA'' NLS_CURRENCY=''$'' NLS_ISO_CURRENCY=''AMERICA'' NLS_NU
    Processing object type SCHEMA_EXPORT/REFRESH_GROUP
    ORA-39083: Object type REFRESH_GROUP failed to create with error:
    ORA-01435: user does not exist
    ORA-06512: at "SYS.DBMS_IREFRESH", line 85
    ORA-01403: no data found
    Failing sql is:
    BEGIN dbms_refresh.make('"TP_PROD"."TP_LEVEL"',list=>null,next_date=>null,interval=>null,implicit_destroy=>TRUE,lax=>FALSE,job=>103,rollback_seg=>NULL,push_deferred_rpc=>TRUE,refresh_after_errors=>FALSE,purge_option => 1,parallelism => 0,heap_size => 0);
    dbms_refresh.add(name=>'"TP_PROD"."TP_LEVEL"',list=>'"TP_PROD"."TP_LEVEL"',
    Job "ORACLE"."SYS_IMPORT_FULL_03" completed with 47 error(s) at 01:32:09There were various errors about grants and jobs but nothing that would affect the table data and the fk constraints. The row counts exactly match between the parent and child tables in the export and import logs - so it looks like whatever the issue is happened at the 10.2.0.4 end.
    Cheers,
    Harry

  • Can't Delete Parent Record - On Delete Cascade is set

    Greetings all,
    I have a parent and child table and when I attempt to delete the parent record, I get the following error:
    ORA-02292: integrity constraint (WFSTEADMAN.INCIDENT_NOTES_TBL_FK) violated - child record found
         Error      Unable to process row of table MYTEST_INCIDENTS.
    I have the the FK set to ON DELETE CASCADE so I am not sure what the issue might be.
    Below are the structures of my parent and child tables:
    I am using apex.oracle.com so the version is: Application Express 4.0.2.00.06
    Any assistance would be appreciated.
    Wally
    PARENT TABLE:
    =============================================================
    CREATE TABLE "MYTEST_INCIDENTS"
    (     "INCIDENTID" NUMBER NOT NULL ENABLE,
         "INCIDENTCREATED" DATE NOT NULL ENABLE,
         "INCIDENT_OWNER" VARCHAR2(200) NOT NULL ENABLE,
         "DTGSTART" DATE NOT NULL ENABLE,
         "DTGEND" DATE,
         "INCIDENT_SERVICES" VARCHAR2(4000),
         "INCIDENT_CUSTOMERS" VARCHAR2(4000),
         "INCIDENT_DESCRIPTION" VARCHAR2(4000),
         "INCIDENT_TIMELINE" VARCHAR2(4000),
         "INCIDENT_TRACKING" VARCHAR2(500),
         "INCIDENT_RESTORE" VARCHAR2(4000),
         "INCIDENT_FOLLOWUP" VARCHAR2(4000),
         "INCIDENT_LEVEL" NUMBER,
         "INCIDENT_TITLE" VARCHAR2(500),
         "EMAIL_NOTIFY" VARCHAR2(4000),
         "TEXT_NOTIFY" VARCHAR2(4000),
         "LEVEL_TYPE" VARCHAR2(25),
         CONSTRAINT "MYTEST_INCIDENTS_PK" PRIMARY KEY ("INCIDENTID") ENABLE
    CREATE OR REPLACE TRIGGER "BI_MYTEST_INCIDENTS"
    before insert on "MYTEST_INCIDENTS"
    for each row
    begin
    if :NEW."INCIDENTID" is null then
    select "MYTEST_INCIDENTS_SEQ".nextval into :NEW."INCIDENTID" from dual;
    end if;
    end;
    ALTER TRIGGER "BI_MYTEST_INCIDENTS" ENABLE;
    CHILD TABLE
    =============================================================
    CREATE TABLE "MYTEST_INC_NOTES"
    (     "NOTEID" NUMBER NOT NULL ENABLE,
         "INCIDENT_ID" NUMBER NOT NULL ENABLE,
         "NOTE_DTG" DATE,
         "NOTE_OWNER" VARCHAR2(200),
         "NOTE_COMMENTS" VARCHAR2(4000),
         CONSTRAINT "MYTEST_INC_NOTES_PK" PRIMARY KEY ("NOTEID") ENABLE
    ) ;ALTER TABLE "MYTEST_INC_NOTES" ADD CONSTRAINT "MYTEST_INC_NOTES_CON" FOREIGN KEY ("INCIDENT_ID")
         REFERENCES "MYTEST_INCIDENTS" ("INCIDENTID") ON DELETE CASCADE ENABLE;
    CREATE OR REPLACE TRIGGER "BI_MYTEST_INC_NOTES"
    before insert on "MYTEST_INC_NOTES"
    for each row
    begin
    if :NEW."NOTEID" is null then
    select "MYTEST_INC_NOTES_SEQ".nextval into :NEW."NOTEID" from dual;
    end if;
    end;
    ALTER TRIGGER "BI_MYTEST_INC_NOTES" ENABLE;
    CREATE OR REPLACE TRIGGER "MYTEST_INC_NOTES_T1"
    BEFORE
    insert or update on "MYTEST_INC_NOTES" REFERENCING NEW AS NEW OLD AS OLD
    for each row
    begin
    :NEW.NOTE_DTG := SYSDATE;
    end;
    ALTER TRIGGER "MYTEST_INC_NOTES_T1" ENABLE;

    Yeah there was a rampant child table still left out there. Noticed the issue and deleted the child and all is well now. :). Should have looked for a couple more minutes before posting.
    Thanks
    Wally

  • I cannot download a working version of Firefox at all. Downloads seem normal but No Program in "Add or Delete programs"and NO ICON

    I kept getting a mssg "update did not download. make sure there are no other copys of Firefox on your computer". That was on the user account I use strictly for the internet. I keep 3 user accounts, One is the administrator for security, a sort of 3 card monty for security purposes. The one I use for the internet kept repeating that mssg (I sure do miss the firefox spellcheck. I dont like Internet Explorer at all).
    In frustration I deleted firefox from all three user accounts and attempted to download a fresh browser. All things seemed to download as normal but after the restart there was no Firefox Icon or any evidence of the program in the "Add or Delete Programs". It simply seems to disappear.
    I tried downloading on the administrator account and the other two to the same effect.
    I tried to do over and began to notice on the File Download-Security Warning Dialox Box that there were several different addresses beside "From;" from several different countrys, including halifax which didnt appear in the following examples
    For exampl the dialog box I have up now says
    File Download-Security Warning
    Name: Firefox setup 6.0. exe
    Type: Application, 13.3MB
    From: mirror.informatik.uni-mannheim.de
    Now I am going to delete this one and click the download from Firefox homepage again and it should be another;
    It is. Same Dialog Box but
    FROM: mirror.team-cymru.org
    I delete and do that again...and also a different
    FROM: mozilla.mirror.ac.za
    try again..and yes it is different too;
    FROM: mirror.metrocast.net
    try again...the same result
    FROM: mirror.Istn.net
    try again...
    FROM: www.mirrorservice.org
    try again...
    and for the first time this session I get a repeat of the last result.
    My intuition tells me this cant be normal in conjunction with the fact that after going through a normal download process any of these possibilities needs to restart and then after rebooting there is no firefox icon or any evidence the program downloaded at all.
    Perhaps I could do a check of the math on remaing MB space, but there has to be something wrong here.

    Using "System Restore" can cause your Firefox installation to get corrupted because not all files are restored (only files in a white-list), so be cautious with using System Restore.<br />
    You need to (re)install software that was affected.<br />
    Remove the Firefox program folder (C:\Program Files\Mozilla Firefox\) before reinstalling a freshly downloaded Firefox copy to do a clean install.
    You can find the latest Firefox release in all languages and for all Operating Systems here:
    *Firefox 11.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • I've searched to no avail for this problem. Similar posts but none that tell me what to do. I can't add or delete any bookmarks on my iPad 2 running the newest iOS. I know how it's suppose to work, it just isn't working!

    I've searched to no avail for this problem. Similar posts but none that tell me what to do. I can't add or delete any bookmarks on my iPad 2 running the newest iOS. I know how it's suppose to work, it just isn't working!
    It started after the major update to iOS 7.
    I can't believe that this is so hard to do. It's just not letting me. I can add a bookmark to the home screen just fine, just not in a bookmarks folder anywhere I try.
    I've used Apple products since 2001 and have always loved how intuitive they are. But the Safari browser since iOS 7 has been the worst I've experienced. At least right in the beginning after that update.
    I'd really appreciate any help that doesn't just tell me how it's suppose to work...I know that.
    My iPad 4 is not affected with the problem and works as it should.

    To delete, tap "Edit" (tap to enlarge image)

  • Hello, I would like to know how to add or delete single cell in numbers.

    Hello, I would like to know how to add or delete single cell in numbers.

    If by delete you really mean clear the contents of a cell, then just click once on the cell and hit the 'delete' button.
    Before:
    After hitting delete button:
    In some circumstances you can actually delete one cell.
    For example here, I make this choice:
    Resulting in this:
    So it's not strictly true that Numbers does not delete one cell, ever.  It can if you have a one-column table. 
    So never say never or not ever! Enough pedantry for today!
    SG

  • Error while processing dimension after add or delete property

    Hi Experts,
    I use BPC for MS SP6 with SQL Server 2008. I detected a problem while processing dimension after add or delete property.
    The error message is: u201CMemory error: Allocation failure : Not enough storage is available to process this command. Error Code = 0x8007000E, External Code = 0x00000000.u201D
    I tried to truncate and drop dimension tables and process dimension again, and it doesnu2019t work.
    Any idea?
    Thanks a lot for your support!
    Albert

    Hi Sorin,
    Yestarday in the afternoon, we added a Property at another Dimension, and we continued having the same problem: we had errors when processing that dimension, but after restarting the server, we can process dimension.
    Looking at the Event Viewer, at 'OutlookSoft log' environment, the following error appears:
    <<
    3/28/2011 6:57:15 PM
    ModuleName : Olap9Manager - DeleteDimension
    Message : Error Code = 0x8007000E, External Code = 0x00000000:.
    Error Code = 0x8007000E, External Code = 0x00000000:.
    Error Code = 0x8007000E, External Code = 0x00000000:.
    Stack :    at Microsoft.AnalysisServices.AnalysisServicesClient.SendExecuteAndReadResponse(ImpactDetailCollection impacts, Boolean expectEmptyResults, Boolean throwIfError)
       at Microsoft.AnalysisServices.AnalysisServicesClient.Alter(IMajorObject obj, ObjectExpansion expansion, ImpactDetailCollection impact, Boolean allowCreate)
       at Microsoft.AnalysisServices.Server.Update(IMajorObject obj, UpdateOptions options, UpdateMode mode, XmlaWarningCollection warnings, ImpactDetailCollection impactResult)
       at Microsoft.AnalysisServices.Server.SendUpdate(IMajorObject obj, UpdateOptions options, UpdateMode mode, XmlaWarningCollection warnings, ImpactDetailCollection impactResult)
       at Microsoft.AnalysisServices.MajorObject.Update(UpdateOptions options, UpdateMode mode, XmlaWarningCollection warnings)
       at Microsoft.AnalysisServices.MajorObject.Update(UpdateOptions options)
       at Osoft.Services.Platform.YukonAdmin.Olap9Manager.DeleteDimension(String strAppset, String strDimension, String strCube, String dimTablePrefx, Boolean bDeleteFromDB, String& strMsg, Boolean bOnlySharedDim)
    >>
    Any idea in order to identify the root cause?
    Thanks in advance,
    Albert

  • When I updated to iOS 8.3 I lost all shared photo albums on my iPad Air. Other devises which I shared to still have access to photo albums but my iPad does not, therefore I can no longer add or delete to shared albums. I can create new shared albums.

    When I updated to iOS 8.3 I lost all shared photo albums on my iPad Air. Other devises which I shared to still have access to photo albums but my iPad does not, therefore I can no longer add or delete to shared albums. I can create new shared albums.

    Hello JimS19,
    I'm sorry to hear you are having these issues with your iPad. If you are having issues accessing your Shared Albums from your iPad (but not from your other devices), you may want to double-check your iCloud Photo Sharing configuration as outlined in the following articles, just to make sure it hasn't changed:
    iCloud Photo Sharing FAQ - Apple Support
    Get help using iCloud Photo Sharing and shared albums - Apple Support
    Sincerely,
    - Brenden

  • I no longer get my bookmarks in my dropdown menu on my yahoo tool bar plus i cannot add or delete apps on my yahoo toolbar.i believe this all started w/ a firefox upgrade of some sort.

    i no longer get my bookmarks in my drop down menu on my yahoo tool bar plus i cannot add or delete apps on my yahoo toolbar. i have emailed yahoo and they said it is not their trouble & to call at&t and i called att and they said not their trouble go back to yahoo .......but i believe this all started w/ a firefox upgrade of some sort.

    I know you can't help with my Yahoo problem, however, apparently at some time in the past I have went to the Sync and tried to figure it out on both my laptop and my desktop, because I have the long snyc key information. However, when I go to try to sync both computers I never get the box to enter that key on either one. That is my problem. So should I try and get a new sync key and see if that works.

Maybe you are looking for

  • Buying a Mac mini for music

    I'm buying a Mac mini in September - so I will have Snow Leopard - to use with the latest version of Logic and the latest version of Pro Tools and use for my college work and recording my band. I plan on using an M-Audio MobilePre USB, external hard

  • Changing the Admin name

    How can i change the Admin name on my mac mini?

  • May (free) Quicktime 7 only be installed on more than 1 home computer?

    My family has several home computers, and would like to: Have (free) QuickTime 7 installed on more than one of those computers at a time. (Potentially) use (free) Quicktime 7 on more than one of those computers at the same time. However, the QuickTim

  • Audio In/Out problems

    Hey First thing is - Can I use a regular microphone from a headset in the Audio - IN port on the MacBook? Secondly - The headphone port is REALLY loose and can be moved less then a millimeter and it will revert back to the internal speakers instead o

  • Synchronization with Mobile Server using Websphere MQ

    Hi! Can anybody tell me how to carry out synchronization between Lite and Mobile Server via Websphere MQ messaging system? Unfortunately, in our case MQ queues is the only way to communicate between Mobile client and Mobile Server thus we can't use H