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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » SQL Anywhere for Windows CE » Configuring Windows CE databases

Copying a database to your Windows CE device Next Page

Rebuilding databases on Windows CE

When rebuilding a database on Windows CE, you have the following options:

The first three options are recommended when upgrading a Windows CE database. However, if these options are not available to you, you can use dbunload on CE. Before deciding to use dbunload on Windows CE, you should consider the following implications of using dbunload on Windows CE:

Because running dbunload on a Windows CE device can require more resources than some devices have available, upgrading the database on a different platform is recommended whenever possible.


If you want to run dbunload on a Windows CE device, you must choose the Unload/Reload Support option in the Deploy SQL Anywhere 10 for Windows CE 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 CE.

Notes about using dbunload on Windows CE

To use dbunload on a Windows CE device, ensure you have performed the following tasks:

The following steps can be embedded into third-party Windows CE applications so that the process is automated for the end user. If you choose to do this, then you should consider using the -qc and/or -q dbunload and dbrunsql options or calling the DBUnload function in dbtool10.dll.

To unload a database on Windows CE (dbunload)
  1. On a platform other than Windows CE, create a new, empty SQL Anywhere 10 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 (this way, dbicu10.dll is not required by the database server).

  2. Copy the SQL Anywhere 10 software and the empty SQL Anywhere 10 database file to the Windows CE device. See Notes about using dbunload on Windows CE.

  3. Ensure there are no database servers running on the device.

  4. Run the following command:

    dbunload-path\dbunload -c "UID=DBA;PWD=DBA-password;CHARSET=none;DBF=existing-database" unload-directory
  5. Ensure that dbunload succeeded, and then close the dbunload window.

  6. Execute the following command:

    dbrunsql-path\dbrunsql -c "UID=DBA;PWD=sql;CHARSET=none;DBF=new-empty-SQLAnywhere10databasefile" -g- \reload.sql
  7. Ensure that dbrunsql succeeded, and then close the dbrunsql window.

  8. Remove the reload.sql file and unload-directory from the Windows CE device.