ASA SQL User's Guide
Importing and Exporting Data
Rebuilding databases
The following procedures should be used only if your database is not involved in replication.
For instructions about rebuilding a database not involved in replication from Sybase Central, see Upgrading the database file format.
To rebuild a database not involved in replication (Command line)
At a command prompt, execute the dbunload command line utility using one of the following options:
The -an
option rebuilds to a new database.
dbunload -c "dbf=asademo.db;uid=DBA;pwd=SQL" -an asacopy.db
The -ac
option reloads to an existing database.
dbunload -c "dbf=asademo.db;uid=DBA;pwd=SQL" -ac "uid=DBA;pwd=SQL;dbf=newdemo.db"
The -ar
option replaces the existing database.
dbunload -c "dbf=asademo.db;uid=DBA;pwd=SQL" -ar "uid=DBA;pwd=SQL;dbf=newdemo.db"
If you use one these options, no interim copy of the data is created on disk, so you do not specify an unload directory on the command line. This provides greater security for your data. The -ar
and -an
options should also execute more quickly than Sybase Central, but -ac
is slower.
Shut down the database and archive the transaction log, before using the reloaded database.
The -an
and -ar
options only apply to connections to a personal server, or connections to a network server over shared memory.
There are additional options available for the dbunload utility that allow you to tune the unload, as well as connection parameter options that allow you to specify a running or non-running database and database parameters.