Sunday, March 11, 2012

Connecting to cluster instance from .NET

Hi
Apologies if this isn't the right forum.
I have an instance of sql (2005) setup called SQL1\SQL1
I am trying to connect to a database (hm1) using the following connection
string in my web.config:
server=SQL1\SQL1;database=hm1;uid=hm1;pwd=hm1;
...but it can't find it. I need to know if this is the correct way to
address an instance in the connection string - I've tried
server=10.0.0.8\SQL1;
and
server=10.0.0.8;database=SQL1\hm1;
But neither work. On the SQL server itself, apart from naming the instance,
are there any other configuration settings I might be missing? (Unfortunately
I didn't set the server up and I know next to nothing about SQL clustering)
I feel like this a bit of a dumb question but any help really appreciated.
Ed
Will this help:
http://www.connectionstrings.com/?carrier=sqlserver
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
..
"edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
news:C37E6C7F-DC56-46F1-9001-32104E89F9D0@.microsoft.com...
Hi
Apologies if this isn't the right forum.
I have an instance of sql (2005) setup called SQL1\SQL1
I am trying to connect to a database (hm1) using the following connection
string in my web.config:
server=SQL1\SQL1;database=hm1;uid=hm1;pwd=hm1;
...but it can't find it. I need to know if this is the correct way to
address an instance in the connection string - I've tried
server=10.0.0.8\SQL1;
and
server=10.0.0.8;database=SQL1\hm1;
But neither work. On the SQL server itself, apart from naming the instance,
are there any other configuration settings I might be missing?
(Unfortunately
I didn't set the server up and I know next to nothing about SQL clustering)
I feel like this a bit of a dumb question but any help really appreciated.
Ed
|||And take a look at http://support.microsoft.com/kb/328306. Connecting to a
clustered instance is not that different from connecting to a standalone
instance.
By the way, when you said "it can't find it", what was it, the server or the
database?
Linchi
"edwaldo" wrote:

> Hi
> Apologies if this isn't the right forum.
> I have an instance of sql (2005) setup called SQL1\SQL1
> I am trying to connect to a database (hm1) using the following connection
> string in my web.config:
> server=SQL1\SQL1;database=hm1;uid=hm1;pwd=hm1;
> ..but it can't find it. I need to know if this is the correct way to
> address an instance in the connection string - I've tried
> server=10.0.0.8\SQL1;
> and
> server=10.0.0.8;database=SQL1\hm1;
> But neither work. On the SQL server itself, apart from naming the instance,
> are there any other configuration settings I might be missing? (Unfortunately
> I didn't set the server up and I know next to nothing about SQL clustering)
> I feel like this a bit of a dumb question but any help really appreciated.
> Ed
|||Thanks for your help - I'll take a look at that article.
I'm getting the message 'SQL Server does not exist or access is denied" in
my .NET app. Not sure if it's the server or the database that I can't
connect to, I can ping the server but that's it. Is there a simple way to
test database connectivity to the instance from my web server?
Thanks again.
"Linchi Shea" wrote:
[vbcol=seagreen]
> And take a look at http://support.microsoft.com/kb/328306. Connecting to a
> clustered instance is not that different from connecting to a standalone
> instance.
> By the way, when you said "it can't find it", what was it, the server or the
> database?
> Linchi
> "edwaldo" wrote:
|||> I'm getting the message 'SQL Server does not exist or access is denied" in
Then that KB article will definitely help. At least, it would get you close
to what may have caused it. If not, post back with what you have tried.
Linchi
"edwaldo" wrote:
[vbcol=seagreen]
> Thanks for your help - I'll take a look at that article.
> I'm getting the message 'SQL Server does not exist or access is denied" in
> my .NET app. Not sure if it's the server or the database that I can't
> connect to, I can ping the server but that's it. Is there a simple way to
> test database connectivity to the instance from my web server?
> Thanks again.
>
> "Linchi Shea" wrote:
|||Can you connect to it through SSIS or SQLCMD?
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
..
"edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
news:5EB601E4-CE5D-4A52-BCFE-B8C599CFEF89@.microsoft.com...
Thanks for your help - I'll take a look at that article.
I'm getting the message 'SQL Server does not exist or access is denied" in
my .NET app. Not sure if it's the server or the database that I can't
connect to, I can ping the server but that's it. Is there a simple way to
test database connectivity to the instance from my web server?
Thanks again.
"Linchi Shea" wrote:
[vbcol=seagreen]
> And take a look at http://support.microsoft.com/kb/328306. Connecting to a
> clustered instance is not that different from connecting to a standalone
> instance.
> By the way, when you said "it can't find it", what was it, the server or
> the
> database?
> Linchi
> "edwaldo" wrote:
|||Thanks to both of you for your help.
Is SQLCMD for Sql Express only? I am running Server 2005. The machine I'm
trying to connect FROM is not running SQL.
I hadn't heard of SSIS - do you know the syntax I should be using to test
connectivity?
Thanks,
Ed
"Tom Moreau" wrote:

> Can you connect to it through SSIS or SQLCMD?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> ..
> "edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
> news:5EB601E4-CE5D-4A52-BCFE-B8C599CFEF89@.microsoft.com...
> Thanks for your help - I'll take a look at that article.
> I'm getting the message 'SQL Server does not exist or access is denied" in
> my .NET app. Not sure if it's the server or the database that I can't
> connect to, I can ping the server but that's it. Is there a simple way to
> test database connectivity to the instance from my web server?
> Thanks again.
>
> "Linchi Shea" wrote:
>
>
|||I should have said SSMS, not SSIS. (Too many acronyms to remember in SQL
2005!) SSMS = SQL Server Management Studio. Both it and SQLCMD (a command
line utility) are part of the SQL Server client tools. You should have
those on the server. If not, get the install disk and install them there.
At that point, you can log onto SQL Server locally. If you can't, then
there is probably a security issue - i.e. wrong login/password.
If that all works, then install the client tools on another machine and see
if you can connect to the server from them, using the same credentials as
you did previously. Let us know what happens and we can take it further.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
..
"edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
news:3B0450DF-DA21-4686-9B0C-E8EC65570459@.microsoft.com...
Thanks to both of you for your help.
Is SQLCMD for Sql Express only? I am running Server 2005. The machine I'm
trying to connect FROM is not running SQL.
I hadn't heard of SSIS - do you know the syntax I should be using to test
connectivity?
Thanks,
Ed
"Tom Moreau" wrote:

> Can you connect to it through SSIS or SQLCMD?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> ..
> "edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
> news:5EB601E4-CE5D-4A52-BCFE-B8C599CFEF89@.microsoft.com...
> Thanks for your help - I'll take a look at that article.
> I'm getting the message 'SQL Server does not exist or access is denied" in
> my .NET app. Not sure if it's the server or the database that I can't
> connect to, I can ping the server but that's it. Is there a simple way to
> test database connectivity to the instance from my web server?
> Thanks again.
>
> "Linchi Shea" wrote:
>
>
|||Can you TELNET to the assigned service port? Say, for example, that SQL
Server is listening on TCP 1433. Then if you TELNET <ip address or server
name> <port number>, you should get a black screen, which means it
successfully connected. If it can't find the server or port, then you have
a server configuration issue. If you connect successfully, then you have a
client configuration issue.
Sincerely,
Anthony Thomas

"edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
news:5EB601E4-CE5D-4A52-BCFE-B8C599CFEF89@.microsoft.com...[vbcol=seagreen]
> Thanks for your help - I'll take a look at that article.
> I'm getting the message 'SQL Server does not exist or access is denied" in
> my .NET app. Not sure if it's the server or the database that I can't
> connect to, I can ping the server but that's it. Is there a simple way to
> test database connectivity to the instance from my web server?
> Thanks again.
>
> "Linchi Shea" wrote:
a[vbcol=seagreen]
the[vbcol=seagreen]
connection[vbcol=seagreen]
instance,[vbcol=seagreen]
(Unfortunately[vbcol=seagreen]
clustering)[vbcol=seagreen]
appreciated.[vbcol=seagreen]
|||Hello
I am working on this issue with Edwaldo
The problem comes when i try and add the SQL instance within the Enterprise
Manager or even if i try to TELNET to the server.
Any ideas? I have been thinking that this is something to do with the way
that the one to one NAT is configured on the firewall. As it is set for a
value of one at the Coventry end and the start ip address is 10.0.0.10 (which
is the old server and is working) So in the firewall rules they are showing
as being outside the NAT pool.
The issue i have is that changing the NAT pool size with alter the external
IP addresses of other servers which i can not really do. I can make the
change for a couple of seconds and test but then need to change it back.
Any help is greatfully received
Thanks for this
Gareth Collins
"Anthony Thomas" wrote:

> Can you TELNET to the assigned service port? Say, for example, that SQL
> Server is listening on TCP 1433. Then if you TELNET <ip address or server
> name> <port number>, you should get a black screen, which means it
> successfully connected. If it can't find the server or port, then you have
> a server configuration issue. If you connect successfully, then you have a
> client configuration issue.
> Sincerely,
>
> Anthony Thomas
>
> --
> "edwaldo" <edwaldo@.discussions.microsoft.com> wrote in message
> news:5EB601E4-CE5D-4A52-BCFE-B8C599CFEF89@.microsoft.com...
> a
> the
> connection
> instance,
> (Unfortunately
> clustering)
> appreciated.
>
>

No comments:

Post a Comment