First Guide to SQL Anywhere Studio
PART 2. Getting Results with SQL Anywhere Studio
CHAPTER 11. Replicating Data with SQL Remote
Once you have completed the tutorial it is important to undo any changes you have made to the database. Make sure that the following steps are completed in order to insure that the settings are reset properly.
Click the Remote Users folder for the sample database (dba) on the left panel.
Right-click the field user, and select Revoke Remote from the popup menu. Click Yes to remove the user from the list.
Click the Publications folder in the SQL Remote folder.
Right-click DepartmentPub in the right panel and select Delete from the popup menu. Click Yes to confirm the deletion.
Click the Users and Groups folder on the left panel.
Right-click the DBA user on the right panel, and select Revoke Publisher from the popup menu.
Revoking a status while running the database |
Click the Message Types folder in the SQL Remote folder.
Right-click the File message type in the right panel and select Properties.
Delete the publisher address and click OK to restore the settings.
Click the Utilities folder on the left panel.
Double-click Erase Database from the right panel. The Erase An Adaptive Server Anywhere Wizard is displayed.
Enter the name of the database you want to erase or click Browse to search for the database. If you followed the tutorial correctly, the database should be stored in your tutorial directory and called field.db.
On the next page, choose to delete a database file and click next to finish erasing the file.
Now that the tutorial is complete, it might be a good idea to delete the tutorial directory (C:\tutorial) in order to save space.
The most important part of the cleanup process is to ensure that the changes to the sample database are reversed. The integrity of the sample database is very important in order to carry out other tutorials in later chapters of the manual.
Connect to the sample database (dba) using Interactive SQL.
Type the following statements in the command window and click Execute:
DELETE FROM department WHERE dept_id = 202 OR dept_id = 203 OR dept_name = 'Eastern Sales' OR dept_name = 'Western Sales'; COMMIT;
Confirm that the data has been deleted by viewing the data in the tables:
SELECT * FROM department
The inserted data has been deleted and the database has been restored to its original state.
The previous statements delete only the data that was added specifically in the tutorial. If you have modified the database in any other way, you must reverse the changes you have made.