You can use the Unload utility (dbunload) -an or -ar option to rebuild a version 9 or earlier database. Rebuilt databases support all new features and performance enhancements in the latest software version.
The database user specified in the connection-string must have the SELECT ANY TABLE and SERVER OPERATOR system privileges.
It is recommended that you back up your database before rebuilding it.
The database file must be located on the same computer as the SQL Anywhere 16 installation.
Follow the standard precautions for upgrading software. See Upgrade and rebuild precautions.
Ensure that you have exclusive access to the database to be unloaded and reloaded. No other users can be connected.
Ensure that the version 16 utilities are ahead of other utilities in your system path. See How to ensure that you are running the correct version of the utilities when you have multiple versions installed.
Contexte et remarques
The -an option is recommended because it creates a new database leaving the original database intact. The -ar option replaces your old database with a new version 16 database.
Shut down all SQL Anywhere and Adaptive Server Anywhere database servers because the version 16 dbunload utility cannot be used against a database that is running on a previous version of the database server. For example:
dbstop -c "DBF=mydb.db;UID=DBA;PWD=sql"
If possible, defragment the drive where the new database will be stored because a fragmented drive can decrease database performance.
Back up the database. For example:
dbbackup -c "DBF=mydb.db;UID=DBA;PWD=sql" old-db-backup-dir
You must have the BACKUP DATABASE system privilege. See Backing up databases.
Run the Unload utility (dbunload) using the -an or -ar option to create a new database.
dbunload -c "connection-string" -an database-filename
dbunload -c "DBF=mydb.db;UID=DBA;PWD=sql" -an mydb16.db
This command creates a database (by specifying -an). If you specify the -ar option, the existing database is replaced with a rebuilt database. To use the -ar option, you must connect to a personal database server or to a network database server on the same computer as the Unload utility (dbunload).
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|