# Schema compare bug on triggers?

**URL:** <https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002>\
**Category:** Toad for Oracle - Beta\
**Created:** [September 22, 2014, 1:32am UTC](https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002 "2014-09-22T01:32:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [September 22, 2014, 1:32am UTC](https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002/1 "2014-09-22T01:32:41Z")

</div>

Toad 12.6.0.40 x64  
Windows 7 x64 SP1  
Oracle client 11.2.0.3 x64  
Oracle database 11.2.0.3 (one on Win one on Lin, according compared schema

When I run schema compare against two schemas (on one Win Db and one on Lin db, same versions), in trigger definition it shows manydifferences:

 ![SC_1.png](https://global.discourse-cdn.com/quest/original/2X/f/f9a0491e41f19093a8b6dd39506c116ecbe1dd19.png)

when you ope any of these "unsynchronized" trigger, it shows no differences.

 ![sc_2.png](https://global.discourse-cdn.com/quest/original/2X/4/4dcff6cd9a8931cec975d05e6a95ad201543b3de.png)

Even when you run synchro script, some triigers vanished but many of them still remains.

Seems that has something with NLS, so I'm showing them here.

here are NLS parameters on schema which is source for compare (db on Windows):

PARAMETER VALUE

* * *

NLS\_LANGUAGE CROATIAN  
NLS\_TERRITORY CROATIA  
NLS\_CURRENCY kn  
NLS\_ISO\_CURRENCY CROATIA  
NLS\_NUMERIC\_CHARACTERS ,.  
NLS\_CALENDAR GREGORIAN  
NLS\_DATE\_FORMAT DD.MM.RR  
NLS\_DATE\_LANGUAGE CROATIAN  
NLS\_SORT CROATIAN  
NLS\_TIME\_FORMAT HH24:MI:SSXFF  
NLS\_TIMESTAMP\_FORMAT DD.MM.RR HH24:MI:SSXFF  
NLS\_TIME\_TZ\_FORMAT HH24:MI:SSXFF TZR  
NLS\_TIMESTAMP\_TZ\_FORMAT DD.MM.RR HH24:MI:SSXFF TZR  
NLS\_DUAL\_CURRENCY kn  
NLS\_COMP BINARY  
NLS\_LENGTH\_SEMANTICS BYTE  
NLS\_NCHAR\_CONV\_EXCP FALSE

17 rows selected.

PARAMETER VALUE

* * *

NLS\_LANGUAGE CROATIAN  
NLS\_TERRITORY CROATIA  
NLS\_SORT  
NLS\_DATE\_LANGUAGE  
NLS\_DATE\_FORMAT  
NLS\_CURRENCY  
NLS\_NUMERIC\_CHARACTERS  
NLS\_ISO\_CURRENCY  
NLS\_CALENDAR  
NLS\_TIME\_FORMAT  
NLS\_TIMESTAMP\_FORMAT  
NLS\_TIME\_TZ\_FORMAT  
NLS\_TIMESTAMP\_TZ\_FORMAT  
NLS\_DUAL\_CURRENCY  
NLS\_COMP BINARY  
NLS\_LENGTH\_SEMANTICS BYTE  
NLS\_NCHAR\_CONV\_EXCP FALSE

17 rows selected.

PARAMETER VALUE

* * *

NLS\_LANGUAGE CROATIAN  
NLS\_NCHAR\_CHARACTERSET AL16UTF16  
NLS\_TERRITORY CROATIA  
NLS\_CURRENCY kn  
NLS\_ISO\_CURRENCY CROATIA  
NLS\_NUMERIC\_CHARACTERS ,.  
NLS\_CHARACTERSET EE8MSWIN1250  
NLS\_CALENDAR GREGORIAN  
NLS\_DATE\_FORMAT DD.MM.RR  
NLS\_DATE\_LANGUAGE CROATIAN  
NLS\_SORT CROATIAN  
NLS\_TIME\_FORMAT HH24:MI:SSXFF  
NLS\_TIMESTAMP\_FORMAT DD.MM.RR HH24:MI:SSXFF  
NLS\_TIME\_TZ\_FORMAT HH24:MI:SSXFF TZR  
NLS\_TIMESTAMP\_TZ\_FORMAT DD.MM.RR HH24:MI:SSXFF TZR  
NLS\_DUAL\_CURRENCY kn  
NLS\_COMP BINARY  
NLS\_LENGTH\_SEMANTICS BYTE  
NLS\_NCHAR\_CONV\_EXCP FALSE  
NLS\_RDBMS\_VERSION 11.2.0.3.0

20 rows selected.

Here are NLS of destination schema-which is compared with source one (-db on Linux)  
PARAMETER VALUE

* * *

NLS\_LANGUAGE CROATIAN  
NLS\_TERRITORY CROATIA  
NLS\_CURRENCY kn  
NLS\_ISO\_CURRENCY CROATIA  
NLS\_NUMERIC\_CHARACTERS ,.  
NLS\_CALENDAR GREGORIAN  
NLS\_DATE\_FORMAT DD.MM.RR  
NLS\_DATE\_LANGUAGE CROATIAN  
NLS\_SORT CROATIAN  
NLS\_TIME\_FORMAT HH24:MI:SSXFF  
NLS\_TIMESTAMP\_FORMAT DD.MM.RR HH24:MI:SSXFF  
NLS\_TIME\_TZ\_FORMAT HH24:MI:SSXFF TZR  
NLS\_TIMESTAMP\_TZ\_FORMAT DD.MM.RR HH24:MI:SSXFF TZR  
NLS\_DUAL\_CURRENCY kn  
NLS\_COMP BINARY  
NLS\_LENGTH\_SEMANTICS BYTE  
NLS\_NCHAR\_CONV\_EXCP FALSE

17 rows selected.

PARAMETER VALUE

* * *

NLS\_LANGUAGE AMERICAN  
NLS\_TERRITORY AMERICA  
NLS\_SORT  
NLS\_DATE\_LANGUAGE  
NLS\_DATE\_FORMAT  
NLS\_CURRENCY  
NLS\_NUMERIC\_CHARACTERS  
NLS\_ISO\_CURRENCY  
NLS\_CALENDAR  
NLS\_TIME\_FORMAT  
NLS\_TIMESTAMP\_FORMAT &

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 23, 2014, 12:19pm UTC](https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002/2 "2014-09-23T12:19:46Z")

</div>

This is not related to NLS. When it says “Description”, it is referring to the “Description” column of dba\_triggers. In the Schema Compare options, look on the “Object Type Specific Options” tab. For Triggers, it could be that the 2nd option - “Compare schema name in description” option is checked, and that is causing the difference (even though it may not be a real difference).

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [September 23, 2014, 11:08pm UTC](https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002/3 "2014-09-23T23:08:49Z")

</div>

Hi,

John you are right. That option is checked in mine case. Please look at the example of exposed trigger from both sides, description column:

\*\*MR\_APP.\*\*apex$team\_dev\_files\_biu  
before insert or update ON APEX$TEAM\_DEV\_FILES  
for each row

apex$team\_dev\_files\_biu  
before insert or update ON APEX$TEAM\_DEV\_FILES  
for each row

I do not want to expose why is placing schema name in trigger definition very dangerous thing but this problem (schema name in trigger definition) should be removed from definition and may be **the only cause** of running compare tool, so this lead me to say that something is still wrong then elsewhere.

In “File Difference Viewer” (second picture you see in mine post) this is not shown…I mean there is no schema name but both triggers seems to be identical-they are really not identical in any mean!? And this is somehow misleading from mine point of view.

For the end, the best of all, synchro script is correctly generated (with or without schema, regardless what is master compare schema) and this OK.

So mine standing is to show pure vanilla compare, where such a difference will be shown.

Brg  
Damir

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 24, 2014, 5:47am UTC](https://forums.toadworld.com/t/schema-compare-bug-on-triggers/31002/4 "2014-09-24T05:47:41Z")

</div>

The schema name is present in the DESCRIPTION column of DBA\_TRIGGERS if the schema name was included when you created the trigger. If you create the trigger without specifying the schema, then it will not be present in the description.

So your option to ignore this difference is to uncheck “compare schema name in description”.

Of course, you can always recreate the triggers without the schema name if you don’t want to have them there.

Unfortunately, it’s not always practical to just show the raw trigger text in the side by side viewer, because there are so many options of what to compare (ignore case, whitespace, format before comparing, include/exclude schema, etc). If I just showed the raw text, then the side by side compare would show differences that you have chosen to ignore, and the “real” difference would be buried within all of that. So the side by side viewer shows the script that it would create for the trigger based on your options.

I’ll see if I can make some improvements in the “Differs by” text to make it more clear what the difference is in this case.
