Connecting to SQL Server

SQL Query Analyzer Help

SQL Query Analyzer Help

Connecting to SQL Server

Connect to an instance of Microsoft® SQL Server™ to open a query window in SQL Query Analyzer. If you access SQL Query Analyzer through a connection in SQL Server Enterprise Manager, a query window opens automatically. 

If you access SQL Query Analyzer without first establishing a connection, the Connect to SQL Server dialog box is displayed to allow you to specify a database server. This dialog box is also accessible from the toolbar, and from the Connect command on the File menu.

To connect to SQL Server

  1. In the Connect to SQL Server dialog box, enter the name of the database server in the SQL Server box.

    To select the local server, select (local).

    To specify another server or another instance of the server, enter the server name in the SQL Server box. Click the browse button (...) to display a list of active servers. The servers are listed using the format servername\instancename.

  2. Click Windows NT Authentication to connect using Windows NT Authentication.

    -Or-

    Click SQL Server Authentication to connect using SQL Server Authentication.

After you have connected to an instance of SQL Server, you can establish additional connections through the Connect to SQL Server dialog box or you can open a new query. In the latter case, the Connect to SQL Server dialog box is not displayed.

Attempting to connect to an instance of SQL Server version 7.0, running on the same computer as SQL Query Analyzer and SQL Server 2000, may fail under certain conditions. To avoid this problem, make sure that the shared memory protocol option within SQL Server Client Network Utility is disabled before trying to connect. For more information, see How to start the Client Network Utility (Windows).