Verify if the logic model (cataloged in the dictionary) corresponds with the physical model (database) of each one of the objects
(table, index, check, etc). It not only verifies but also gives an idea of what should be execute so that the logical model corresponds
to the physical model.
1 connection.schema.model.status
<connection.schema.model.status
type='type'
dict='dict'
pattern='pattern'
debug='debug'
/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Atype | string | Types of objects you want to create. It is possible to use the option all to indicate that you create all the objects (tables + checks + index+ data upload). | |||
Adict | string | Dictionary where the object is found. If the attribute is left blank, the system search the objects in all the dictionarys of the database taht is running. | |||
Apattern | string | Objects to create, a object code or a style pattern capuntes%, all that begins by capuntes. This attribute is optional, if the system is not informed, it will take all the objects of this type. | |||
Adebug | string | If you want that the system amit a debug informing of the operations that he is making. |
Returns | |
---|---|
Type | Description |
Vtable | Returns a vtable with the result. Retunrs the result for each processed object. |
Example
Verifies the ctercero table, only the table (columns, data types, not null, default, etc).
Copy
<xsql-script name='model_status1'> <body> <println> <connection.schema.model.status debug='true' dict='wic_icon' type='table' pattern='ctercero' /> </println> </body> </xsql-script>
To execute it from the console it should be written:
Copy
bin\ws-dbscript -dbms dbtest -file test.xml -user mlg
The xsql-script prints the result.
Copy
+-----+--------+------+------+--------+----------+-----------+------------+-----------+-----------------------+---------------------------------------------+ |seqno|database|server|schema|dict |table_name|object_type|object_name |defect_type|message |repair | +-----+--------+------+------+--------+----------+-----------+------------+-----------+-----------------------+---------------------------------------------+ | 1|erp_test|dbsrv3| |wic_icon|ctercero |COLUMN |user_created|column name|expected name is coment|RENAME COLUMN ctercero.user_created TO coment| +-----+--------+------+------+--------+----------+-----------+------------+-----------+-----------------------+---------------------------------------------+
The system returns a vtable with the result. The columns of the vtable informs of the processed objects and their results.
Copy
Process sequencer Database Server Schema Dictionary Table Type of analized object Name of the analized object Type of default founded Message Suggestion sequence to execute to repair the difference