ORA-02292 Constraint violation – child records found « Różności …

Różności …

21 lutego 2011

ORA-02292 Constraint violation – child records found

Zaszufladkowany do: Bazy danych,Oracle — Tagi: — Jacek @ 10:28

ORA-02292 – przy kasowaniu rekordu z tabeli master
Błąd wskazuje właściciela i constraint name

Np: tworzenie constraint:

SQL> alter table emp
2 add (constraint job_fk foreign key (job_key)
3 references job (job_key)
4 on delete cascade);

Now, when INSERT or UPDATE the job key column in the EMP table, the foreign key constraint will check to insure that the job already exists in the JOB table (or at least the job key exist in the JOB table).

Foreign key constraints can also be disabled, enabled and dropped.
alter table emp disable constraint job_fk;
alter table emp enable constraint job_fk;
alter table emp drop constraint job_fk;

Now, let’s talk about the ON DELETE part of the constraint. When we created the foreign key constraint . we included ON DELETE SET NULL or ON DELETE CASCADE. This clause tells the database what to do with the child records when the parent record is deleted. In the example above, we created the job_fk constraint with ON DELETE CASCADE.

This will cause the database to cascade the deletes. If I go to the JOB table and DELETE a job, all the employees that have that job will also be deleted as the DELETE will cascade to the child rows.

If we use the ON DELETE SET NULL, then when we delete the parent record, the child records with that value will be set to NULL.

ORA-O6413
Ten błąd pojawił się po instalce Forms and Reports 9i na Win7 (64 bit) przy próbach połączenia z SQL Tools do dowolnej bazy danych.
Zmieniłem PATH i wpis “c:\orawin\bin” (od forms and reports) przeniosłem z pierwszej na ostatnią pozycję – to rozwiązało problem.

SGA_TARGET

ALTER SYSTEM SET SGA_TARGET=2048M scope=both;

ORA-02097: parametr nie może być zmodyfikowany ponieważ podana wartość jest niepoprawna
ORA-00823: Podana wartość sga_target jest większa niż sga_max_size

alter SYSTEM SET SGA_MAX_SIZE=2560M scope=both;
ORA-02095: Podany parametr inicjalizacyjny nie może być modyfikowany

ALTER SYSTEM SET SGA_MAX_SIZE=2560M scope=spfile;
restart bazy

(w systemie jest 4GB RAM)

(w 32 bitowych obsługiwane 1,8 GB – jako SGA)

ORA-27100 shared memory realm already exist
sql> create pfile from spfile
C:\oracle\product\10.2.0\db_1\database\INITorcl.ora
zmienić wartość sga_max_size na mniejszą
sql>create spfile from pfile
zrestartować serwis i jest OK

sql> show parameter sga

Źródła:
http://www.dba-oracle.com/t_ora_02292_constraint_violation_child_record_found.htm

http://blog.flimatech.com/tag/ora-02292/

http://www.dbasupport.com/oracle/ora10g/sizingSGA02.shtml

Oracle Memory Configuration for Windows

Brak komentarzy

Brak komentarzy.

Kanał RSS z komentarzami do tego wpisu.

Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.

Strona startowa: www.jaceksen.pl