Collection Contents Index Setting up the consolidated database Start replicating data pdf/chap11.pdf

First Guide to SQL Anywhere Studio
   PART 2. Getting Results with SQL Anywhere Studio
     CHAPTER 11. Replicating Data with SQL Remote       

Setting up the remote database


The remote database needs to be created and configured in order to send and receive messages and participate in a SQL Remote setup.

The database extraction utility enables you to carry out all the steps needed to create a remote database complete with subscriptions and required user IDs.

You need to extract a database from the consolidated database for remote user field.

  To extract a database:
  1. Click the Remote Users folder, in the SQL Remote folder.

  2. Right-click the field remote user, and select Extract Database from the popup menu. The Extraction Wizard is displayed.

  3. The first page informs you that you will extract from the running database asademo.

  4. On the next page, choose to Start Subscriptions Automatically, for user field.

  5. Create the database as file c:\tutorial\field.db, using a transaction log of name field.log in the same directory.

  6. Choose to extract all parts of the schema (the default setting).

  7. Leave the other options at their default settings, and create the remote database.

In a proper SQL Remote setup, the remote database field would be loaded on to the computer, together with a database server and any client applications required. For this tutorial, we leave the database where it is and use Interactive SQL to input and replicate data.

Top of page  Confirm the database is created properly

To see what the extraction utility has done, connect to the field database and confirm that all the database objects are created.

  To browse through the remote database:
  1. From Sybase Central click the connect button, and enter the user ID field using password field to connect to the database.

On the Database tab of the Connect to Database window, enter the database name field and the database path c:\tutorial\field.db to connect to the field database. Click OK to connect to the Database.

  1. Open the tables folder. The department table, owned by user dba, is in the list.

  2. Right-click the department table, and select View Data from the popup menu. Interactive SQL opens, showing that all the rows of the department table are filled (five rows). Close Interactive SQL.

  3. Open the SQL Remote folder. The field user is displayed in the right panel, showing that field is the publisher for this database. Any data sent from this database comes from the user field, just as any data from the consolidated database comes from the user dba.

  4. Open the Publications folder. You will see that the DepartmentPub publication is present.

  5. Open the Remote Users folder. You will see that user ID dba is present, and is designated as a Consolidated user. This means dba is the publisher of the consolidated database (above the field database in the hierarchy).

You can browse around the rest of the database if you wish.

What next? 

The system is now ready for replication.

Top of page  

Collection Contents Index Setting up the consolidated database Start replicating data pdf/chap11.pdf