dbsync_schema
The dbsync_schema
command allows you to extract and edit DB Sync
schemas.
Syntax 1: Extract a database schema
dbsync_schema extract options
- options: Described in the below Schema extraction options table.
Syntax 2: Edit a database schema
dbsync_schema edit -c config-file
- config-file: The path to the server-side configuration file.
Syntax 3: Schema utility tool
dbsync_schema util options
- options: Described in the below Schema utility options table.
Options
Option | Description |
---|---|
-d dbname |
The name / source of the database. |
-r dvname |
The ODI database driver name. |
-u user |
The DB user name to connect to the DB. |
-p password |
The DB user password to connect to the DB. |
-o owner |
The owner / schema name of SQL tables. |
-c string |
The A/B string for SQL type conversions. |
-f output-file |
The name of the output file. |
Option | Description |
---|---|
-c |
Check the database schema validity. |
-s |
Build SQL commands to create all tables. |
-v |
Build RECORD definitions corresponding to all tables. |
-d driver-type |
ODI driver type for SQL options (ifx,ora,...). |
-t table-list |
Reorder tables from fkey references. |
-u table-name |
Find referencing tables from fkey refs |
-l table-name |
Find referencing tables involving master/detail links. |
-r output-file |
Reorder schema from fkey references. |
Usage
The dbsync_schema extract command can be used to extract a schema from an existing database.
The resulting JSON file can the be edited with dbsync_schema edit, to define SQL table relations, auto-incremented columns, etc.
After editing a schema, it can be tested with the utility options with the dbsync_tool util command.