Home All Groups Group Topic Archive Search About

Cannot connect to MSSQL2005 (Local) Server?

Author
28 Jun 2006 12:24 PM
Asaf
Hello,

I can't connect to MSSQL2005 Standard when providing (Local) for the "data
source=" property in the connection string.
When setting the computer name instead of (Local) it does connect!

Why I can't connect with (Local)?

Thanks in advanced,
Asaf

Author
28 Jun 2006 2:12 PM
Paul Clement
On Wed, 28 Jun 2006 05:24:03 -0700, Asaf <AG70@newsgroups.nospam> wrote:

¤ Hello,
¤
¤ I can't connect to MSSQL2005 Standard when providing (Local) for the "data
¤ source=" property in the connection string.
¤ When setting the computer name instead of (Local) it does connect!
¤
¤ Why I can't connect with (Local)?

You might want to provide a bit more information, such as the connection string you are using and
any error messages that are being generated.


Paul
~~~~
Microsoft MVP (Visual Basic)
Author
28 Jun 2006 2:25 PM
Asaf
Hello Paul,

The C# Connection string is:

workstation id=TestCOMP;packet size=4096;user id=sa;data
source="(Local)";persist security info=True;initial
catalog=TestDB;password=12345


Error message:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied.

Regards,
Asaf

Show quote
"Paul Clement" wrote:

> On Wed, 28 Jun 2006 05:24:03 -0700, Asaf <AG70@newsgroups.nospam> wrote:
>
> ¤ Hello,
> ¤
> ¤ I can't connect to MSSQL2005 Standard when providing (Local) for the "data
> ¤ source=" property in the connection string.
> ¤ When setting the computer name instead of (Local) it does connect!
> ¤
> ¤ Why I can't connect with (Local)?
>
> You might want to provide a bit more information, such as the connection string you are using and
> any error messages that are being generated.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
Author
28 Jun 2006 2:43 PM
Norman Yuan
Do you actually use quote mark around "(local)", as you showed? In the
connectionString, it should be

....data source=(local);...

Not

....data source="(local)";...

Show quote
"Asaf" <AG70@newsgroups.nospam> wrote in message
news:F2D902C1-94D2-4D6A-B5A0-2901FB1792AB@microsoft.com...
> Hello Paul,
>
> The C# Connection string is:
>
> workstation id=TestCOMP;packet size=4096;user id=sa;data
> source="(Local)";persist security info=True;initial
> catalog=TestDB;password=12345
>
>
> Error message:
>
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
> denied.
>
> Regards,
> Asaf
>
> "Paul Clement" wrote:
>
>> On Wed, 28 Jun 2006 05:24:03 -0700, Asaf <AG70@newsgroups.nospam> wrote:
>>
>> ¤ Hello,
>> ¤
>> ¤ I can't connect to MSSQL2005 Standard when providing (Local) for the
>> "data
>> ¤ source=" property in the connection string.
>> ¤ When setting the computer name instead of (Local) it does connect!
>> ¤
>> ¤ Why I can't connect with (Local)?
>>
>> You might want to provide a bit more information, such as the connection
>> string you are using and
>> any error messages that are being generated.
>>
>>
>> Paul
>> ~~~~
>> Microsoft MVP (Visual Basic)
>>
Author
28 Jun 2006 4:25 PM
Asaf
Hello Norman,

I am using only (Local).

I can Login to SQL Server with the "SQL Server management studio" using
(Local) at the "Server Name".

But when I place a "sqlConnection" control on a Windows Form I *can't*
connect to (Local).

Regards,
Asaf


Show quote
"Norman Yuan" wrote:

> Do you actually use quote mark around "(local)", as you showed? In the
> connectionString, it should be
>
> ....data source=(local);...
>
> Not
>
> ....data source="(local)";...
>
> "Asaf" <AG70@newsgroups.nospam> wrote in message
> news:F2D902C1-94D2-4D6A-B5A0-2901FB1792AB@microsoft.com...
> > Hello Paul,
> >
> > The C# Connection string is:
> >
> > workstation id=TestCOMP;packet size=4096;user id=sa;data
> > source="(Local)";persist security info=True;initial
> > catalog=TestDB;password=12345
> >
> >
> > Error message:
> >
> > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
> > denied.
> >
> > Regards,
> > Asaf
> >
> > "Paul Clement" wrote:
> >
> >> On Wed, 28 Jun 2006 05:24:03 -0700, Asaf <AG70@newsgroups.nospam> wrote:
> >>
> >> ¤ Hello,
> >> ¤
> >> ¤ I can't connect to MSSQL2005 Standard when providing (Local) for the
> >> "data
> >> ¤ source=" property in the connection string.
> >> ¤ When setting the computer name instead of (Local) it does connect!
> >> ¤
> >> ¤ Why I can't connect with (Local)?
> >>
> >> You might want to provide a bit more information, such as the connection
> >> string you are using and
> >> any error messages that are being generated.
> >>
> >>
> >> Paul
> >> ~~~~
> >> Microsoft MVP (Visual Basic)
> >>
>
>
>
Author
28 Jun 2006 4:51 PM
Paul Clement
On Wed, 28 Jun 2006 07:25:01 -0700, Asaf <AG70@newsgroups.nospam> wrote:

¤ Hello Paul,
¤
¤ The C# Connection string is:
¤
¤ workstation id=TestCOMP;packet size=4096;user id=sa;data
¤ source="(Local)";persist security info=True;initial
¤ catalog=TestDB;password=12345
¤
¤
¤ Error message:
¤
¤ [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
¤ denied.
¤

Is SQL Server configured for SQL Server Authentication? It's possible that it may only be configured
for Windows Authentication.


Paul
~~~~
Microsoft MVP (Visual Basic)
Author
28 Jun 2006 6:10 PM
Asaf
Hello Paul,

The server is not configured to use only Windows Authentication as I can
login from the "SQL Server Managment studio" using (Local) at the name server.


Show quote
"Paul Clement" wrote:

> On Wed, 28 Jun 2006 07:25:01 -0700, Asaf <AG70@newsgroups.nospam> wrote:
>
> ¤ Hello Paul,
> ¤
> ¤ The C# Connection string is:
> ¤
> ¤ workstation id=TestCOMP;packet size=4096;user id=sa;data
> ¤ source="(Local)";persist security info=True;initial
> ¤ catalog=TestDB;password=12345
> ¤
> ¤
> ¤ Error message:
> ¤
> ¤ [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
> ¤ denied.
> ¤
>
> Is SQL Server configured for SQL Server Authentication? It's possible that it may only be configured
> for Windows Authentication.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
Author
28 Jun 2006 6:47 PM
Asaf
Hi,

I have found the solution.

At SQL Server 2005 configuration manager -> SQL Server 2005 Network
Configuration -> Protocols For MSSQLSERVER.

TCP/IP must be enabled with TCP port 1433

Now I can login from my connection string to (Local) name server.


Regards,
Asaf


Show quote
"Asaf" wrote:

> Hello,
>
> I can't connect to MSSQL2005 Standard when providing (Local) for the "data
> source=" property in the connection string.
> When setting the computer name instead of (Local) it does connect!
>
> Why I can't connect with (Local)?
>
> Thanks in advanced,
> Asaf
>
Author
5 Jul 2006 7:54 PM
alex.kinsella
I had to enable TCP/IP - it's disabled by default.  Did that and
verified the port was 1433 and everything worked great for me too.
Thanks!

Asaf wrote:
Show quote
> Hi,
>
> I have found the solution.
>
> At SQL Server 2005 configuration manager -> SQL Server 2005 Network
> Configuration -> Protocols For MSSQLSERVER.
>
> TCP/IP must be enabled with TCP port 1433
>
> Now I can login from my connection string to (Local) name server.
>
>
> Regards,
> Asaf
>
>
> "Asaf" wrote:
>
> > Hello,
> >
> > I can't connect to MSSQL2005 Standard when providing (Local) for the "data
> > source=" property in the connection string.
> > When setting the computer name instead of (Local) it does connect!
> >
> > Why I can't connect with (Local)?
> >
> > Thanks in advanced,
> > Asaf
> >

AddThis Social Bookmark Button