LogoASPAlliance: Articles, reviews, and samples for .NET Developers
Connecting to a Remote SQL Server
by Web Team at ORCS Web
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 16222/ 16

Sometimes you cannot log in locally to a SQL server, so you need to make a remote connection. Usually this is over the Internet using TCP/IP. Tools that you can use to connect to a remote SQL server are Enterprise Manager, Query Analyzer, or even through code. Enterprise Manager and Query Analyzer are part of the SQL Tools and can be found in the SQL Server installation disk. You can download an evaluation version of SQL Server from Microsoft's web site. Once the trial period has elapsed the local database will no longer function, but the SQL Client tools will continue to operate fine.

Configuring SQL Connection Alias
Once you have installed the SQL Server Client Tools on your local workstation or server, you can find the tools under the Start menu (on your desktop)- Programs - Microsoft SQL Server. Select the option called Client Network Utility.

In the Networking Utility click on the alias tab, then click add. Below is a picture of the add alias window.

Make sure TCP/IP is selected in the Network libraries. By default, the SQL 7.0 client tools use Named Pipes protocol. In the Server alias field enter the fully qualified domain name or the IP address of the SQL server you are connecting to. The Connection parameters are filled in automatically. Click OK to exit both of the opened windows.

Configuring Enterprise Manager
Now that the location of the SQL Server and the protocol to use has been configured, you are ready to configure your Enterprise Manager. Open Enterprise Manager, which is found under Microsoft SQL server in your Start Menu.

In the Tree view on the left side of the application window, expand Microsoft SQL Server. Right click SQL Server Group and select New SQL Server Registration. Click next. The next window is displayed below.

Select the alias that you just created and click add and then next. In the next window, select SQL Server Authentication and click next. Enter your SQL server username and password and click next twice and then finish.

Enterprise Manager will then connect to the SQL server and authenticate your username and password. You also can now connect with Query Analyzer using the same connection alias you created for Enterprise Manager.

By Benjamin Higgins

©Copyright 1998-2021  |  Page Processed at 2021-11-26 6:59:48 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search