Compare (by date of last update) the objects (trig, xudf, xudp, table, alla) a dictionary database (origin), against other dictionary database (destiny).
 

1 connection.schema.code.compare

<connection.schema.code.compare
    debug='debug'
    table='table|all'
    dict='dict'
    pattern='pattern'
    project='project'
/>
Example

Compares the triggers of a dictionary (of the connection of the script) and the destiny.

Copy
<xsql-script name='test_compare'>
    <body>
        <println>
            <connection.schema.code.compare table='wic_jrep_object' dict='wic_copy_a' />
        <println>
    </body>
</xsql-script>

To execute it from the console write the following: bin\ws-dbscript -dbms wic_test_a -file test_compare.xml -user mlg

The xsql-script prints the following result:

Copy
+-----+--------+------+------+--------+----------+----+-------------------------------+---------------------+--------+---------+
|seqno|database|server|schema|dict_src|dict_dst  |type|code                           |date_src             |date_dst|status   |
+-----+--------+------+------+--------+----------+----+-------------------------------+---------------------+--------+---------+
|    1|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|cenllote_del                   |2007-08-24 13:42:53.0|        |NOT FOUND|
|    2|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|facturah_del                   |2008-03-26 20:16:46.0|        |NOT FOUND|
|    3|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|capuntes_del                   |2008-04-09 16:49:43.0|        |NOT FOUND|
|    4|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|repalbl_del                    |2008-01-25 13:20:05.0|        |NOT FOUND|
|    5|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|repairl_upd                    |2008-01-25 12:55:21.0|        |NOT FOUND|
|    6|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|cterceor_ins                   |2007-11-09 17:44:28.0|        |NOT FOUND|
|    7|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|taptcuen_del                   |2008-02-15 17:26:25.0|        |NOT FOUND|
|    8|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|ws_cvenfacl_del                |2008-03-12 12:09:02.0|        |NOT FOUND|
|    9|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|trig|ws_cvenfacl_upd                |2008-03-12 12:06:04.0|        |NOT FOUND|
+-----+--------+------+------+--------+----------+----+-------------------------------+---------------------+--------+---------+
Copy
+-----+--------+------+------+--------+----------+-----+----------------------------+---------------------+--------+---------+
|seqno|database|server|schema|dict_src|dict_dst  |type |code                        |date_src             |date_dst|status   |
+-----+--------+------+------+--------+----------+-----+----------------------------+---------------------+--------+---------+
|    1|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|table|resultats_tem               |2008-04-04 12:44:34.0|        |NOT FOUND|
|    2|wic_misc|dbsrv1|      |wic_misc|wic_copy_a|table|repaird                     |2008-01-24 16:50:44.0|        |NOT FOUND|
+-----+--------+------+------+--------+----------+-----+----------------------------+---------------------+--------+---------+
Copy
seqno: Identification number of the object.
database: Database.
server: Server where exist the database.
schema: Name of the schema.
dict_src: Origin dictionary (of the connection of execution of the xsql-script).
dict_dst: Destiny dictionary, the one that is placed in the attribute dict.
type: Type of object, if it is executed with all, here it will appear the type of object (trig, xudf, xudp, etc).
code: Code of the object.
date_src: Date of the last modification in the origin dictionary.
date_dst: Date of the last modification in the destiny dictionary.
status: Result of the comparation:
   OLD: This means that the object is old (that the update date in the origin is higher than the destiny).
   NEW: This means that  the update date in the destiny is higher than the origin.
   EQUAL: This means that the update date is equal in the origin than in destiny.
   NOT FOUND: This means that the object was not found in the destiny dictionary.