Rebuild a database on Windows Mobile using the Unload (dbunload) and Script Execution (dbrunsql) utilities. This rebuild option is not available for smartphones. This option is not recommended it can require more resources than some devices have available. It is recommended that you rebuild the database on another platform and then copy the database to the Windows Mobile device.
Ensure the database is not running. Ensure there are no database servers running on the device.
You must have the SELECT ANY TABLE and SERVER OPERATOR system privileges.
To run dbunload on a Windows Mobile device, you must choose the Unload/Reload Support option in the Deploy SQL Anywhere 16 for Windows Mobile Wizard. You can modify your SQL Anywhere installation to add this support if you did not select this option when you first installed SQL Anywhere for Windows Mobile.
Contexte et remarques
Before deciding to use dbunload on Windows Mobile, you should consider the following implications of using dbunload on Windows Mobile:
the size of the database server's temporary file (both the unload and reload can cause this file to grow to several megabytes)
the extra space required for dbunload and related components
the extra cost of having multiple copies of a database on the Windows Mobile device
To use dbunload on a Windows Mobile device, ensure that:
The following files are deployed to your SQL Anywhere installation directory (by default, \Program Files\SQLAny16):
The following files are deployed to the \Windows directory if you are intending to unload old (version 9 or earlier) databases and you are including dbunlspt.exe.
The following files are deployed to the \Windows directory:
Ensure that the Location string value (REG_SZ) is set to the SQL Anywhere software directory, inside the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\SQL Anywhere\16.0\.
On a platform other than Windows Mobile, create a new, empty SQL Anywhere 16 database.
The CHAR collation sequence should match that of the existing database. If NCHAR UCA sorting is not required, the NCHAR collation sequence should be UTF8BIN. In this way, the ICU libraries (dbicu16.dll, dbicudt16.dat) are not required by the database server.
Copy the SQL Anywhere 16 software and the empty SQL Anywhere database file to the Windows Mobile device.
Run the following command to unload the database:
dbunload-path\dbunload -c "UID=DBA;PWD=DBA-password;CHARSET=none;DBF=existing-database" unload-directory
When dbunload completes, close the dbunload window.
Run the following command to run the reload.sql script file against the empty SQL Anywhere database file:
dbrunsql-path\dbrunsql -c "UID=DBA;PWD=sql;CHARSET=none;DBF=new-empty-SQLAnywhere16database-file" -g- \reload.sql
When dbrunsql completes, close the dbrunsql window.
You can remove the reload.sql file and unload-directory from the Windows Mobile device.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|