Share via


How to: Connect to a User Instance

SQL Server Management Studio or SQL Server Management Studio Express allows developers to administer SQL Server Express user instances. The prerequisite for using SQL Server Management Studio or SQL Server Management Studio Express with a SQL Server Express user instances is that the user instance should be running and active. When a user instance is running, SQL Server Management Studio connects to the user instance using the named pipe protocol.

To determine which named pipe to use to connect to the parent instance of SQL Server Express

  1. To open SQL Server Management Studio, click Start, click All Programs, click Microsoft SQL Server 2005 and then click SQL Server Management Studio.

    Note

    SQL Server Management Studio Express is available as a free download. You can install it from SQL Server Management Studio Express download center.

  2. To open a new query editor window in SQL Server Management Studio, click New Query.

  3. In the new query window, enter the following commands:

    Use Master;
    GO
    Select owning_principal_name, instance_pipe_name from sys.dm_os_child_instances;
    GO
    
  4. After the results are displayed, under the owning_principal_name column, find the user name for which the user instance was generated. From the instance_pipe_name column, copy the named pipe value.

  5. Create a new database connection. In Object Explorer, click Connect, and then click Database Engine. In the Connect to Server dialog box, paste the named pipe value, preceded by np:, as shown:

    np:\\.\pipe\3C3DF6B1-2262-47\tsql\query

You can now use SQL Server Management Studio to manage objects related to your user instance.

See Also

Concepts

sys.dm_os_child_instances
User Instances for Non-Administrators

Help and Information

Getting SQL Server 2005 Assistance