|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ora-04089 =(
ORA-04089: cannot create triggers on objects owned by SYS
CREATE OR REPLACE TRIGGER ValidateNation AFTER INSERT OR UPDATE OF Nation ON ALLOWED_NATIONALITY FOR EACH ROW DECLARE rowCount integer; BEGIN /* Look for the new nation in the Allowed_nationality Table. */ SELECT Count(*)INTO rowcount FROM ALLOWED_NATIONALITY PA WHERE :new.Nation = PA.NATION /* If the nation doest not exists in the table, then send warning message */ If rowCount < 1 then DBMS_OUTPUT.PUT_LINE ('An artist with '|| :new.Nation ||' does not exist'); End if; END; / I need a bit of guidance, and I'm a little confused as to what I'm supposed to do. |
|
#2
|
||||
|
||||
|
ORA-04089: cannot create triggers on objects owned by SYS
Seems you have created your application tables in the SYS schema, which is an overprivileged user to be used only for database maintenance. This is one of the worst things you can do.
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Ora-04089 =( |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|