Changing Passwords and Encryption Settings for a Database

When the encryption or password properties on a Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) database have been set, these properties can only be modified when the database is compacted.

Besides setting these security properties on the database, the compact feature is primarily used to compress unused space in a database and to search for database consistency errors. For more information, see Maintaining Databases (SQL Server Compact Edition).

You can compact SQL Server Compact Edition databases by using the following mechanisms:

Note

When you compact a password protected or encrypted database, you must specify the password for the original database.

Note   SQL Server Management Studio lets you modify the password and encrypt a database by selecting an option in the Database Properties dialog box. For more information, see How to: Secure a Database (SQL Server Management Studio).