When comparing schemes, differences in triggers appear due to case sensitivity.
Example:
Run the following script in database one:
CREATE TABLE HR2.TESTCOMPARETRIGGER
(
C1 VARCHAR2(20 BYTE),
C2 VARCHAR2(20 BYTE)
)
TABLESPACE USERS;
CREATE OR REPLACE TRIGGER HR2.COPY_C1_TO_C2_TRG
BEFORE INSERT ON HR2.TESTCOMPARETRIGGER
FOR EACH ROW
BEGIN
:NEW.c2 := :NEW.c1;
END;
/
Run the following script in database two:
CREATE TABLE HR2.TESTCOMPARETRIGGER
(
C1 VARCHAR2(20 BYTE),
C2 VARCHAR2(20 BYTE)
)
TABLESPACE USERS;
CREATE OR REPLACE TRIGGER HR2.COPY_C1_TO_C2_trg
BEFORE INSERT ON HR2.TESTCOMPARETRIGGER
FOR EACH ROW
BEGIN
:NEW.c2 := :NEW.c1;
END;
/
Note that the difference is just in the name (with TRG and trg in it)
Then, go to Database | Compare | Schemas and compare both schemas (selecting tables and triggers is enough in this case).
Toad will mark the trigger HR2.TESTCOMPARETRIGGER as "objects which differ", although when you open the files to see the differences, it won't highlight anything.
In the Compare Schemas option, go to Options | Objects and, on the right hand, uncheck "Case sensitive" under "PL/SQL Objects, View Source, Check Constraints".
Then run the compare again.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center