SQL Server Compact 3.5 uses SQL Server Management Studio in SQL Server 2005 and later versions, Server Explorer in Visual Studio 2005 and later versions, Query Designer in Visual Studio 2005 and later versions, Transact-SQL Editor in Visual Studio 2010, and SQL Server Compact 3.5 Query Analyzer to access and query data. SQL Server Management Studio, Server Explorer, Query Designer, Transact-SQL Editor, and SQL Server Compact 3.5 Query Analyzer can be used to do the following:

  • Upgrade SQL Server 2005 Mobile Edition or SQL Server 2005 Compact Edition database files to SQL Server Compact 3.5.

  • Create databases.

  • Manage and connect to other databases on a device.

  • Verify remote data access (RDA) and replication applications. (Not supported by Transact-SQL Editor.)

  • Create, modify, and delete tables and indexes in a database.

  • Add new columns, and delete or change the properties of existing columns, Query objects by using the supported SQL statement.

  • Insert and delete rows in a table.

  • Modify existing data in a table.

  • Create or modify primary key and foreign key relationships between tables.

  • Encrypt an unencrypted database. If an unencrypted database is encrypted in the Query Analyzer or Server Explorer, the database is encrypted by using the Encryption Mode as platform default.

  • Change the password of an encrypted database.

  • Compact and repair a database.

SQL Server Management Studio

SQL Server Management Studio is a suite of administrative tools for managing the components that belong to SQL Server. This integrated environment lets you perform a variety of tasks, such as backing up data, modifying queries, and automating common functions in a single interface. SQL Server Management Studio can be used to manage SQL Server Compact 3.5 databases both on Windows desktop and mobile device applications.

SQL Server Management Studio in SQL Server 2008 and later versions provides additional features as follows:

  • Create a publication for merge replication with SQL Server Compact 3.5 subscribers.

  • Create a SQL Server Compact 3.5 subscription

SQL Server Management Studio in SQL Server 2005 and later versions can be used to create a publication for merge replication with SQL Server Compact 3.5 subscribers. Other operations, such as creating a database and managing a database, are not supported.

Server Explorer

Server Explorer in Visual Studio 2005 and later versions also provides database administration support for SQL Server Compact databases on Windows Desktop and on Windows mobile devices.

In Visual Studio 2010, Server Explorer only supports SQL Server Compact 3.5 databases. You will be prompted to upgrade the database to SQL Server Compact 3.5 if you try to open a SQL Server Compact 3.1 database.

You can access Server Explorer in Visual Studio by using any one of the following:

  • Open Visual Studio, click View and then click Server Explorer.

  • Open Visual Studio, click Tools and then click Connect to Server.

Server Explorer provides features for all common database tasks such as creating a database, creating a table, and running Transact-SQL query. Server Explorer can connect to SQL Server Compact 3.5 databases on both Windows desktop and Windows Mobile devices.

Server Explorer does not support creating subscriptions. To create subscriptions, use one of the following:

  • For merge replication with SQL Server 2005, use SQL Server Management Studio that is installed with SQL Server 2005 SP2.

  • Create a SQL Server Compact 3.5 subscription programmatically. For more information, see How to: Create a Subscription (Programmatically).

Transact-SQL Editor

The Transact-SQL Editor is supported for SQL Server Compact 3.5 databases beginning with Visual Studio 2010. Earlier versions of Visual Studio do not provide support for using the Transact-SQL Editor on SQL Server Compact databases. Visual Studio 2010 does not provide support for using the Transact-SQL Editor on databases created with earlier versions of SQL Server Compact.

Transact-SQL Editor in Visual Studio 2010 provides the ability to run free-text Transact-SQL queries against a SQL Server Compact 3.5 database. The Transact-SQL Editor also provides the ability to view and save detailed estimated and actual query show-plans for SQL Server Compact 3.5 databases. Previously, the functionality provided by the Transact-SQL Editor was only available through SQL Server Management Studio.

SQL Server Compact 3.5 Query Analyzer

SQL Server Compact 3.5 Query Analyzer is a graphical tool that runs on supported devices. It is installed when SQL Server Compact 3.5 is installed on a device. Query Analyzer can connect to the database on the mobile device only where it is installed. Query Analyzer does not support creating publication and subscription for Merge replication between SQL Server and SQL Server Compact 3.5.

In This Section

Topic

Description

SQL Server Management Studio and SQL Server Management Studio Express (SQL Server Compact)

Provides more information about Management Studio.

Visual Studio Transact-SQL Editor

Provides more information about Visual Studio Transact-SQL Explorer.

SQL Server Compact Query Analyzer

Provides more information about SQL Server Compact 3.5 Query Analyzer.

Tasks

How to: Install Query Analyzer (SQL Server Compact)