Testing features and completing the tutorials in the SQL Anywhere documentation sometimes results in changes to the sample database that can prevent the successful completion of subsequent tutorials and tests. When this happens, you can restore the sample database to its original state. Alternatively, if you need to preserve the sample database in its current state, then you can recreate the sample database in its original state using a different name. Both methods are presented below.
At a command prompt, change to the samples directory.
For the default location of samples-dir, see SQLANYSAMP11 environment variable.
Execute the following command to erase demo.db:
dberase demo.db |
Type y when prompted to confirm your choice and to delete the transaction log.
Execute the following command to create a new, empty sample database:
dbinit demo.db |
At a command prompt, change to the install-dir\scripts directory.
For information about the default location of install-dir, see SQLANY11 environment variable.
Execute the following command to load the new sample database with objects and data:
dbisql -c "DSN=SQL Anywhere 11 Demo" mkdemo.sql |
At a command prompt, change to the samples directory.
For information about the default location of samples-dir, see SQLANYSAMP11 environment variable.
Execute the following command to create a database called mydemo.db:
dbinit mydemo.db |
Execute the following command to start the database:
dbeng11 mydemo.db |
At a command prompt, change to the install-dir\scripts directory.
For the default location of install-dir, see SQLANY11 environment variable.
Execute the following command to load mydemo.db with the objects and data used to create the demo database:
dbisql -c "UID=DBA;PWD=sql" mkdemo.sql |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |