Schema Compare for Oracle 6

Ignore rules - syntax and examples

If no ignore rules are specified, all objects are included. For each object type, a rule expression will determine the objects to include based on the object's name.  The rule expression can also be set up to exclude objects by using the negation operator.

Two new operators have been added to standard Oracle regular expressions.

\! – negation – used when we want to reverse the result of the condition (be sure to include the backslash in both the GUI and cmdline)

\& - logical AND – used when several conditions are combined within one pattern  (be sure to include the backslash in both the GUI and cmdline)


Suppose we have a database schema with the following tables:

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Intent

Pattern

Result (included tables are BLUE BOLD)

Fetch all objects 

.

(or leave the field unchanged)

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch exactly one object with the given name: T2

T2

(^T2$ will also work)

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects containing a specified pattern, eg TAB

TAB1+

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects that start with a specified pattern, eg PRE

^PRE

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects that do not start with a specified pattern, eg PRE

\!^PRE

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects that must end with a specified pattern, eg PRE

PRE$

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects that must not end with a specified pattern\!PRE$

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetching objects using a combination of patterns

All listed patterns within a group are treated as a logical OR, but in a single pattern custom marker \& can be used which is translated to logical AND.

Intent

Pattern

Result

Fetch objects starting with PRE, containing TAB AND NOT ending with SUB

^PRE+\&TAB\&\!SUB$

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Fetch objects containing: 

  • table with name T1
  • tables with name starting from ONE
  • tables with name starting from PRE and containing phrase TAB and not ending with SUB

eg, T1 OR ^ONE OR (^PRE AND TAB AND NOT SUB$)

"T1”, "^ONE", "^PRE+\&TAB\&\!SUB$"

T1, T2, T3, PRE_TAB1, PRE_TAB2, PRE_TAB1_PRE, PRE_TAB1_SUB, ONE_TAB1_PRE, ONE_TAB2_SUB

Exclude all tables

\!

All tables are excluded




Didn't find what you were looking for?