Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Remote » Managing SQL Remote systems » Remote database extraction to a reload file

 

Creating a remote database from the reload.sql file (command line)

Create a remote database using an existing database as a model. A schema, remote users, publications, subscriptions, and triggers are also generated.

Prérequis

There are no prerequisites for this task.

 Task
  1. Use the Extraction utility (dbxtract) to extract the database schema and data to files. For example, run the following command:

    dbxtract -c "UID=DBA;PWD=sql;DBF=c:\cons\cons.db" "c:\remote1\reload.sql" UserName

    By default, subscriptions for the specified remote user are started automatically.

  2. Edit the reload.sql, if required.

  3. Create an empty SQL Anywhere database.

    For example, run the following command:

    dbinit -dba DBA,sql c:\remote1\rem1.db
  4. Connect to the database from Interactive SQL, and run the reload.sql script file.

    For example, execute the following statement:

    READ remote1\reload.sql

    The new remote database, rem1.db, is created with the appropriate schema, remote users, publications, subscriptions, and triggers. However, the Extraction utility (dbxtract) does not start the SQL Remote Message Agent, so no messages are exchanged.

Résultat

The remote database is created.

 See also