
Upgrading SQL Server Compact 2.0 Database Files
You can upgrade a database that was created by using SQL Server CE (version 2.0) by using the SQL Server Compact 3.5 Database Upgrade tool (Upgrade.exe). The Database Upgrade tool can be run on a Windows Mobile device. For using Upgrade.exe, both the SQL Server Compact 3.5 and SQL Server CE runtime must be installed on the mobile device.
When you run the SQL Server Compact 3.5 Database Upgrade tool, the new SQL Server Compact database is created on the smart device. The new database, with the file name extension .sdf, contains all the data that was in the source database. To continue to use the upgraded database for replication, you must reinitialize it.
For more information, see How to: Upgrade SQL Server Compact 2.0 By Using the Database Upgrade Tool and Database Upgrade Tool (SQL Server Compact).
If, in a SQL Server CE database, a UNIQUE constraint is specified on a column without specifying NULL|NOT NULL attributes, the column is created that has a NOT NULL attribute automatically. If you try to upgrade this database to SQL Server Compact 3.5, the same column attributes are copied over. Therefore, you will be unable to insert NULL attributes to this table, even after you upgrade to SQL Server Compact 3.5. For more information about NULL|NOT NULL, see ALTER TABLE (SQL Server Compact).
Important: |
|---|
|
If you are using replication or remote data access (RDA) as a connectivity solution when you upgrade to SQL Server Compact 3.5, you must synchronize the source SQL Server Compact 3.5 database (subscription database) with the SQL Server database (Publisher). The reason to synchronize before you upgrade to SQL Server Compact 3.5 is this: Any changes to tables on the SQL Server CE database must be updated on the SQL Server database because, after the upgrade, you must re-subscribe or re-pull, by using the new database.
|