Remove one or several object physically from the database as cataloged in the dictionary.
1 connection.schema.model.drop
<connection.schema.model.drop
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
Removes the index of the ctercero table.
Copy
<xsql-script name='model_drop1'> <body> <println> <connection.schema.model.drop debug='true' dict='wic_icon' type='table' pattern='ctercero' /> </println> </body> </xsql-script>
To execute it from the console it shoult 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|group|status |message |source | +-----+--------+------+------+--------+----------+-----+-------+----------------------------------------------------------------+-------------------------------------------------+ | 1|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero1 dropped. |DROP INDEX f_ctercero1 | | 2|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero2 dropped. |DROP INDEX f_ctercero2 | | 3|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero3 dropped. |DROP INDEX f_ctercero3 | | 4|erp_test|dbsrv3| |wic_icon|ctercero |1/1 |SUCCEED|TABLE ctercero altered, operation is DROP CONSTRAINT f_ctercero4|ALTER TABLE ctercero DROP CONSTRAINT f_ctercero4 | | 5|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero4 dropped. |DROP INDEX f_ctercero4 | | 6|erp_test|dbsrv3| |wic_icon|ctercero |1/1 |SUCCEED|TABLE ctercero altered, operation is DROP CONSTRAINT f_ctercero5|ALTER TABLE ctercero DROP CONSTRAINT f_ctercero5 | | 7|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero5 dropped. |DROP INDEX f_ctercero5 | | 8|erp_test|dbsrv3| |wic_icon|ctercero |1/1 |SUCCEED|TABLE ctercero altered, operation is DROP CONSTRAINT f_ctercero6|ALTER TABLE ctercero DROP CONSTRAINT f_ctercero6 | | 9|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero6 dropped. |DROP INDEX f_ctercero6 | | 10|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero7 dropped. |DROP INDEX f_ctercero7 | | 11|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero8 dropped. |DROP INDEX f_ctercero8 | | 12|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero9 dropped. |DROP INDEX f_ctercero9 | | 13|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero10 dropped. |DROP INDEX f_ctercero10 | | 14|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX f_ctercero11 dropped. |DROP INDEX f_ctercero11 | | 15|erp_test|dbsrv3| |wic_icon|ctercero |1/1 |SUCCEED|TABLE ctercero altered, operation is DROP CONSTRAINT p_ctercero |ALTER TABLE ctercero DROP CONSTRAINT p_ctercero | | 16|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX p_ctercero dropped. |DROP INDEX p_ctercero | | 17|erp_test|dbsrv3| |wic_icon|ctercero |1/1 |SUCCEED|TABLE ctercero altered, operation is DROP CONSTRAINT u_ctercero1|ALTER TABLE ctercero DROP CONSTRAINT u_ctercero1 | | 18|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX u_ctercero1 dropped. |DROP INDEX u_ctercero1 | | 19|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX i_ctercero1 dropped. |DROP INDEX i_ctercero1 | | 20|erp_test|dbsrv3| |wic_icon| |1/1 |SUCCEED|INDEX i_ctercero2 dropped. |DROP INDEX i_ctercero2 | +-----+--------+------+------+--------+----------+-----+-------+----------------------------------------------------------------+-------------------------------------------------+
The system returns a vtable with the result. The columns of the vtable informs of the processed objects and their result.
Copy
Process sequencer Database Server Schema Dictionary Table Result Message Executed sentence