Tuesday, February 14, 2012

Connecting to the SQLEXPRESS on your computer

How do I connect to the SQLEXPRESS installed on my computer without network connection (as a standalone computer)?

Thanks.

hi,

local connections are usually performed via shared memory, so you do not require network protocols to be enabled to connect to a local instance..

what kind of problems are you experiencing? you usually generate a connection string like those provided in http://www.connectionstrings.com/, thus something similar to

Data Source=(Local)\NamedInstanceName;Initial Catalog=the_database;Integrated Security=SSPI;

regards

|||

I was having problems connecting to my local PC even after creating a security user and using the correct connection string. Turns out that I needed to go into SQL Server Configuration Manager and enable TCP/IP Protocol. Everything was disabled by default. Start, All Programs, Microsoft SQL Server 2005, Configuaration Tools, SQL Server Configuration Manager (local), SQL Native Client Configuration, Client Protocols, Right Click TCP/IP and select properties to enable.

|||

Hi Cecook,

You were probably connecting through MDAC. This is fine and fully supported, but you do have to enable TCP/IP in order to connect with legacy providers. If you use the new SQL Native Client (SNAC) you can connect directly to SQL using Shared Memory and you don't need to enable TCP/IP for local connections. SNAC also supports ODBC and OLEDB as well.

Note: You always have to enable TCP/IP or Named Pipes to connect to SQL from a remote client.

Mike

No comments:

Post a Comment