What is the Connection String for Connecting to a SQL Server 2005 Database?

What is the connection string for connecting to a SQL Server 2005 database

The connection string needed for connecting to a SQL Server 2005 database (code name Yukon) is as follows:

server=LOCALHOST\LOCAL;database=myDatabase;uid=myID;pwd=myPass

Where LOCALHOST\LOCAL is your SQL server address and LOCAL is the instance of the SQL Server (which can be named anything, but by default it is LOCAL).
This normally works if you have the application that connects to the database located on the same server as the SQL Server.
The following connection string should work aswell:

server=192.168.0.1\LOCAL;database=myDatabase;uid=myID;pwd=myPass

For connecting to a remote database, simply replace 192.168.0.1 with the IP of the remote server.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top