Extracting remote databases automatically

For information about extracting remote databases to a reload file, see Remote database extraction.

Use the following procedure to extract a consolidated database and reload the schema and data into a new database. No interim copy of the data is created on disk.

 Automatically extract a remote database (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the consolidated database as a user with DBA authority.

  2. From the Tools menu, click SQL Anywhere 12 » Extract Database.

  3. When prompted, click Extract And Reload Into A New Database.

    When prompted, click Extract Structure And Data.

  4. Follow the instructions in the wizard and accept the defaults.

    The new remote database is created with the appropriate schema, remote users, publications, subscriptions, and triggers. By default, the data from the consolidated database is extracted to the remote database and the subscriptions are started. However, the wizard does not start the SQL Remote Message Agent, so no messages are exchanged.

 Automatically extract a remote database (SQL)
  1. Connect to the consolidated database as a user with DBA authority.

  2. Run the Extraction utility (dbxtract) and specify the -ac option to extract to an existing database or the -an option to extract to a new database.

    If you specify the -an option, you must create an empty database before running the Extraction utility (dbxtract). For example, the following command creates an empty database named mydata.db:

    dbinit c:\remote\mydata.db

    Run the following command to extract a new remote database from a consolidated database located at c:\consolidateddata.db. The new database is for the remote user named field_user and the new database is created at c:\remote\mydata.db:

    dbxtract -c "UID=DBA;PWD=sql;DBF=c:\consolidateddata.db" 
    -an c:\remote\mydata.db field_user
    

    The new remote database, mydata.db, is created with the appropriate schema, remote users, publications, subscriptions, and triggers. By default, the data from the consolidated database is extracted into the remote databases and the subscriptions are started. However, the Extraction utility (dbxtract) does not start the SQL Remote Message Agent, so no messages are exchanged.

 See also