Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Data import and export » Database rebuilds » Tips on rebuilding databases using the Unload utility


Rebuilding databases not involved in synchronization or replication

Using the Unload utility (dbunload), you can unload a database and rebuild it to a new database, reload it to an existing database, or replace an existing database.


The following procedure should be used only if your database is not involved in synchronization or replication.

You must have the SELECT ANY TABLE and SERVER OPERATOR system privileges.

Context and remarks

The -an and -ar options only apply to connections to a personal server, or connections to a network server over shared memory. The -ar and -an options should also execute more quickly than the Unload Database Wizard in Sybase Central, but -ac is slower than the Unload Database Wizard.

You can use other dbunload options to specify a running or non-running database and database parameters.

  1. Run the Unload utility (dbunload), specifying one of the following options:

    To do this... Use this option... Example
    Rebuild to a new database -an
    dbunload -c "DBF=demo.db;UID=DBA;PWD=sql" -an DemoBackup.db
    Reload to an existing database -ac
    dbunload -c "DBF=demo.db;UID=DBA;PWD=sql" -ac "UID=DBA;PWD=sql;DBF=mynewdemo.db"
    Replace an existing database -ar
    dbunload -c "DBF=demo.db;UID=DBA;PWD=sql" -ar

    If you use one of these options, no interim copy of the data is created on disk, so you do not need to specify an unload directory on the command line. This provides greater security for your data.

  2. Shut down the database and archive the transaction log before using the reloaded database.


The database is unloaded and reloaded to the specified location.

 See also