This runs the Compare Schemas function.
The parameters required by this function are similar to the options on the Compare Schemas Options tab.
The Compare Schemas window has a function Tools > Genenerate Batch Control Statement which will generate this script control statement for you, based on the options specified. It is recommended that this is used, rather then coding the Compschema function from scratch.
When this is function is run, a tab-delimited report is sent to the file specified by the parameter File
.
Parameter |
Description |
Note |
|
The schema you are comparing. |
|
|
Schema you are comparing to. |
|
|
The name of the database containing Schema1 |
You must already have signed onto this database. |
|
The name of the database containing Schema2. |
|
|
The type of object you are comparing. |
This must correspond to the For many databases this can only be one value: For some other databases (such as Oracle), this can be one of several values such as: This parameter is optional. If not given, or the name supplied is not a valid object-name, the first object in the Database Explorer will be used. |
|
The type of object you are comparing to. |
If not given, the same as Object1. |
|
A filter string for comparing a subset of the tables in the Schema. |
|
|
|
You would use this if the Schema you are comparing to is in a different Sybase/SQL Server database to one signed onto. |
|
The compare method. |
Values:
|
|
When the compare method is FULL, this specifies how the columns in the tables will be compared. |
Options are
|
|
Name of the file the Compare Schema report is written to. |
|
|
Whether the report is to |
Default is |
|
Specifies whether the report is to include ALL tables ( |
Default is |
Parameters marked * are mandatory
Example:
--aqt compschema,dbs1=ora_tst,object1=Tables,schema1=DEMO,dbs2=ora_prod,
object2=Tables,schema2=DEMO,method=fast,file=compschema.txt,filemode=replace