Automatically extract remote databases

For information about automatically extracting remote databases and its alternative, extracting remote databases to a reload file, see Extracting remote databases.

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.

To automatically extract a remote database (Sybase Central)
  1. Connect to the consolidated database as a user with DBA authority.

  2. From the Tools menu, choose SQL Anywhere 11 » Extract Database.

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

    When prompted, choose 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 Message Agent, so no messages are exchanged. See Understanding the Message Agent (dbremote).

To 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. See Extraction utility (dbxtract).

    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 Message Agent, so no messages are exchanged. See Understanding the Message Agent (dbremote).

See also