MobiLink Synchronization Reference
Utilities
Creates an Adaptive Server Anywhere client database using another Adaptive Server Anywhere database as a template. This utility is deprecated. For an alternative way to create client databases, see Creating a remote database.
mlxtract [ additional-options ] directory site-name
Option | Description |
---|---|
-ac "keyword=value; ..." | Connect to the database specified in the connect string to do the reload. |
-al filename | Log file name for this new database. |
-an filename | Creates a database file with the same settings as the database being unloaded and automatically reloads it. |
-c "keyword=value; ..." | Supply database connection parameters. |
-id | Extract schema definition and data. |
-it | Extract triggers. |
-j count | Iteration count for view-creation statements. |
-l level | Perform all extraction operations at specified isolation level. |
-o file | Output messages to file. |
-p character | Escape character. |
-q | Operate quietly: do not print messages or show windows. |
-r file | Specify name of generated reload Interactive SQL command file (default "reload.sql"). |
-s7 | Use Adaptive Server Anywhere version 7 syntax for creating synchronization definitions. |
-u | Unordered data. |
-v | Verbose messages. |
-x | Use external table loads. |
-xh | Exclude procedure hooks. |
-xf | Exclude foreign keys. |
-xp | Exclude stored procedures. |
-xv | Exclude views. |
-y | Overwrite command file without confirmation. |
directory |
The directory to which the files are written. This option is not needed if you use -an or -ac.
|
site-name | Specify which client database to generate. |
mlxtract is the MobiLink extraction utility for Adaptive Server Anywhere client databases. It is run against an Adaptive Server Anywhere reference database and creates a new client database or a command file for an Adaptive Server Anywhere client database, depending on the chosen options.
The command line extraction utility creates a command file and a set of associated data files. The command file can be run against a newly initialized Adaptive Server Anywhere database to create the database objects and load the data for the client database.
By default, the command file is named reload.sql.
Reload the data to an existing database (-ac) You can combine the operation of extracting a database and reloading the results into an existing database using this option.
For example, the following command (which should be entered all on one line) loads a copy of the data for the field_user subscriber into an existing database file named newdemo.db:
mlxtract -c "uid=DBA;pwd=SQL;dbf=asademo.db" -ac "uid=DBA;pwd=SQL;dbf=newdemo.db" field_user
If you use this option, no copy of the data is created on disk, so you do not specify an unload directory on the command line. This provides greater security for your data, but at some cost for performance.
Reload the data to a new database (-an) You can combine the operations of extracting a database, creating a new database, and loading the data using this option.
For example, the following command (which should be entered all on one line) creates a new database file named asacopy.db and copies the schema and data for the field_user subscriber of asademo.db into it:
mlxtract -c "uid=DBA;pwd=SQL;dbf=asademo.db" -an asacopy.db field_user
If you use this option, no copy of the data is created on disk, so you do not specify an unload directory on the command line. This provides greater security for your data, but at some cost for performance.
Connection parameters (-c) A set of connection parameters, in a string.
mlxtract connection parameters The user ID should have DBA authority to ensure that the user has permissions on all the tables in the database.
For example, the following statement (which should be typed on one line) extracts a database for MobiLink user ID joe_remote from the ASADemo database running on the sample_server server, connecting as user ID DBA with password SQL. The data is unloaded into the c:\extract directory.
mlxtract -c "eng=sample_server;dbn=sademo; uid=DBA;pwd=SQL" c:\extract joe_remote
Extract both schema definition and data (-id) By default, only the schema is extracted. Such a database can be initialized with data upon the first connection to a MobiLink synchronization server. This option provides the option of extracting the initial set of data from the reference database.
Extract triggers (-it) By default, triggers are not extracted. This option provides causes triggers present in the reference database to be extracted.
Iteration count for views (-j) If there are nested views in the consolidated database, this option specifies the maximum number of iterations to use when extracting the views.
Perform extraction at a specified isolation level (-l) The default setting is an isolation level of zero. If you are extracting a database from an active server, you should run it at isolation level 3 to ensure that data in the extracted database is consistent with data on the server. Increasing the isolation level may result in large numbers of locks being used by the extraction utility, and may restrict database use by other users.
Output messages to file (-o) Outputs the messages from the extraction process to a file for later review.
Escape character (-p) The default escape character (\) can be replaced by another character using this option.
Operate quietly (-q) Display no messages except errors.
Reload filename (-r) The default name for the reload command file is reload.sql in the current directory You can specify a different file name with this option.
Use ASA v7 syntax (-s7) This option is useful when you are using an Adaptive Server Anywhere version 8 or higher consolidated database along with Adaptive Server Anywhere version 7 remote databases. For example, create a version 9 consolidated database, extract the remote databases using the -s7 option, and deploy the reload.sql files to the remote.
Output the data unordered (-u) By default the data in each table is ordered by primary key. Unloads are quicker with the -u option, but loading the data into the client database is slower.
Verbose mode (-v) The name of the table being unloaded and the number of rows unloaded are displayed. The SELECT statement used is also displayed.
Use external loads (-x) In the reload script, the default is to use the LOAD TABLE statement to load the data into the database. If you choose to use external loads, the Interactive SQL INPUT statement is used instead. The LOAD TABLE statement is faster than INPUT.
INPUT takes the path of the data files relative to the client, while LOAD TABLE takes the path relative to the server.
Exclude foreign key definitions (-xf) You can use this if the client database contains a subset of the consolidated database schema, and some foreign key references are not present in the client database.
Exclude stored procedure (-xp) Do not extract stored procedures from the database.
Exclude views (-xv) Do not extract views from the database.
Operate without confirming actions (-y) Without this option, you are prompted to confirm the replacement of an existing reloadcommand file.