Using Query Tools (SQL Server Compact)

SQL Server Compact 3.5 uses SQL Server Management Studio in SQL Server 2005 and later versions, Server Explorer in Visual Studio 2008, and SQL Server Compact 3.5 Query Analyzer to access and query data. SQL Server Management Studio, Server Explorer 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.
  • 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 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 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 in Visual Studio 2008 also provides database administration support SQL Server Compact 3.5 databases on Windows Desktop and on Windows mobile devices.

You can access Server Explorer in Visual Studio 2008 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).

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.

Topic Description

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

Provides more information about Management Studio.

SQL Server Compact Query Analyzer

Provides more information about SQL Server Compact 3.5 Query Analyzer.

Show: