dbTalk Databases Forums  

Connection Strangeness

microsoft.public.sqlserver.connect microsoft.public.sqlserver.connect


Discuss Connection Strangeness in the microsoft.public.sqlserver.connect forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
firebalrog
 
Posts: n/a

Default Connection Strangeness - 04-30-2010 , 06:08 PM






We have the following in the hosts file
10.10.9.2 lvac03dmz
10.10.9.20 lvac09dmz
10.10.9.2 dmzserver

We can connect to the database (same on both .2,.20 getting ready for
migrating to new server we want to change the alias dmzserver in the
future to .20) using any of the following in the connection string
10.10.9.2\sqlexpress, lvac03dmz\sqlexpress, 10.10.9.20\sqlexpress,
lvac09dmz\sqlexpress

it will not connect using
dmzserver\sqlexpress

Also on some workstations all of the above works. only on a couple of
4 xp workstations does it fail.

we have also tried adding cname to dns for dmzserver but the ipconfig /
displaydns shows a ttl consistant with it getting the ip from the
hosts file and not from the dns server.

Ping all of the hosts works fine with a 126ms response. (clients are
on different subnets)

We also did ipconfig /flushdns which made no difference

Any ideas would be greatly appreciated.

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Connection Strangeness - 05-01-2010 , 08:41 AM






firebalrog (barrettpaulj (AT) gmail (DOT) com) writes:
Quote:
We have the following in the hosts file
10.10.9.2 lvac03dmz
10.10.9.20 lvac09dmz
10.10.9.2 dmzserver

We can connect to the database (same on both .2,.20 getting ready for
migrating to new server we want to change the alias dmzserver in the
future to .20) using any of the following in the connection string
10.10.9.2\sqlexpress, lvac03dmz\sqlexpress, 10.10.9.20\sqlexpress,
lvac09dmz\sqlexpress

it will not connect using
dmzserver\sqlexpress
And the error message is?

Quote:
Also on some workstations all of the above works. only on a couple of
4 xp workstations does it fail.
Which version of SQL Server? What client software is there on the client?

One thing I can think of is that there are SQL Server specific alias
point in the wrong direction. Run CLICONFG.EXE on the problematic machines
and see what you find.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #3  
Old   
firebalrog
 
Posts: n/a

Default Re: Connection Strangeness - 05-01-2010 , 02:39 PM



On May 1, 6:41*am, Erland Sommarskog <esq... (AT) sommarskog (DOT) se> wrote:
Quote:
firebalrog (barrettpa... (AT) gmail (DOT) com) writes:
We have the following in the hosts file
10.10.9.2 lvac03dmz
10.10.9.20 lvac09dmz
10.10.9.2 dmzserver

We can connect to the database (same on both .2,.20 getting ready for
migrating to new server we want to change the alias dmzserver in the
future to .20) using any of the following in the connection string
10.10.9.2\sqlexpress, lvac03dmz\sqlexpress, 10.10.9.20\sqlexpress,
lvac09dmz\sqlexpress

it will not connect using
dmzserver\sqlexpress

And the error message is?

Also on some workstations all of the above works. only on a couple of
4 xp workstations does it fail.

Which version of SQL Server? What client software is there on the client?

One thing I can think of is that there are SQL Server specific alias
point in the wrong direction. Run CLICONFG.EXE on the problematic machines
and see what you find.

--
Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008:http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005:http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:http://www.microsoft.com/sql/prodinf...ons/books.mspx
At home now but as I recall the error message was a login timeout.

I will check the client versions working vs not working when I get
back in and will also try cliconfg.exe

But what is interesting is the fact that it connects to both machines
when using the specific IP or the true server name but fails when you
use the dmzserver alias that is in hosts or as a cname in the dns
server. Perhaps there was something fixed in the sqlclient that
changes this behavior.


Thanks

Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Connection Strangeness - 05-01-2010 , 04:38 PM



firebalrog (barrettpaulj (AT) gmail (DOT) com) writes:
Quote:
At home now but as I recall the error message was a login timeout.
This is an important point. If you get something like "timeout during
login", this may indicate that you make contact, but authentication is
not able to get through. In that case, the DNS for the server is not
a problem. But the reverse DNS from the server back to the workstations
may be.

Also, if possible use SQLCMD or OSQL to connect to the server to get
the error message, in case the application just produces a generic
error message.

Quote:
But what is interesting is the fact that it connects to both machines
when using the specific IP or the true server name but fails when you
use the dmzserver alias that is in hosts or as a cname in the dns
server.
You would certainly get this behaviour if someone has set up an
alias in CLICONFG, as this overrides anything else.



--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #5  
Old   
firebalrog
 
Posts: n/a

Default Re: Connection Strangeness - 05-03-2010 , 04:59 PM



Well cliconfig shows working computer is identical to the ones that
can only connect by the actual computer name or IP. No alias setup,
all dll version numbers and dates are identical.

Just in case it was unclear dmzserver is an additional entry in the
hosts file or as a cname in the dns server. On some computers if you
use dmzserver as the server name in the connection string it will
connect and on some others it still will not connect. But the IP is
identical to the working host entries or A records in the dns server.

The application works on all computers if you use lvac03dmz but will
not work on some of the computers if you use dmzserver.

Is it possible that there is some other windows dll at play here that
is not related directly to the sql native client?

All of the workstations are XP with all security patches and sp3
installed.

Reply With Quote
  #6  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Connection Strangeness - 05-03-2010 , 05:04 PM



firebalrog (barrettpaulj (AT) gmail (DOT) com) writes:
Quote:
Well cliconfig shows working computer is identical to the ones that
can only connect by the actual computer name or IP. No alias setup,
all dll version numbers and dates are identical.

Just in case it was unclear dmzserver is an additional entry in the
hosts file or as a cname in the dns server. On some computers if you
use dmzserver as the server name in the connection string it will
connect and on some others it still will not connect. But the IP is
identical to the working host entries or A records in the dns server.

The application works on all computers if you use lvac03dmz but will
not work on some of the computers if you use dmzserver.

Is it possible that there is some other windows dll at play here that
is not related directly to the sql native client?

All of the workstations are XP with all security patches and sp3
installed.
Do you have OSQL or SQLCMD on the clients so that you can test
connecting from them? It would be interesting to see a raw error
message from the API.

Or exactly what error message does your application produce?

Also, check the SQL Server error log, if there are any message about
login failures that are related to these connection failures.

You need to establish exactly where the connection fails. There are a
couple of possibilities.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #7  
Old   
firebalrog
 
Posts: n/a

Default Re: Connection Strangeness - 05-03-2010 , 05:07 PM



Exact error message is as follows.

Unhandled Execption has occurred....

A network-related or instance-specific error occurred while
establishing a connection to sqlserver the server was not found ow was
not accessible. Verify that the instance name is correct and that sql
server is configured to allow remote connections (Provider: Named
pipes)
Provider Error 40- Could not open a connection to sql server).

Reply With Quote
  #8  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Connection Strangeness - 05-04-2010 , 04:50 PM



firebalrog (barrettpaulj (AT) gmail (DOT) com) writes:
Quote:
Exact error message is as follows.

Unhandled Execption has occurred....

A network-related or instance-specific error occurred while
establishing a connection to sqlserver the server was not found ow was
not accessible. Verify that the instance name is correct and that sql
server is configured to allow remote connections (Provider: Named
pipes)
Provider Error 40- Could not open a connection to sql server).
OK, so this means that the machines are not able to make contact with
SQL Server.

Since PING seems to work, this means they cannot be confused about
where the machine is located. (But doublecheck that PING DMZSERVER
actually gives the correct IP address.)

The one thing I could guess on is some network restriction. Maybe there is
some funny Active Directory setting which bans contact to DMZSERVER
for these machines? (But what I know about Active Directory fits on a
fingernail - and leaves most of the nail empty.)

The error message says Named Pipes, could that be a clue? Then again,
I think Named Pipes usually appears in these error messages, because
it is the last attempt.

Did you try connecting directly on the IP address to test the effect
of that?



--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #9  
Old   
Rick Byham, MSFT
 
Posts: n/a

Default Re: Connection Strangeness - 05-05-2010 , 10:36 AM



So "it connects to both machines when using the specific IP or the true
server name but fails when you
use the dmzserver alias"
But when it fails it gives a named pipes error. So why is it trying to
connect with named pipes? Try forcing a tcp connection by connecting to
"tcp:server\instance"
Does it work then? Perhaps this is a named pipes specific problem.
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote

Quote:
firebalrog (barrettpaulj (AT) gmail (DOT) com) writes:
Exact error message is as follows.

Unhandled Execption has occurred....

A network-related or instance-specific error occurred while
establishing a connection to sqlserver the server was not found ow was
not accessible. Verify that the instance name is correct and that sql
server is configured to allow remote connections (Provider: Named
pipes)
Provider Error 40- Could not open a connection to sql server).

OK, so this means that the machines are not able to make contact with
SQL Server.

Since PING seems to work, this means they cannot be confused about
where the machine is located. (But doublecheck that PING DMZSERVER
actually gives the correct IP address.)

The one thing I could guess on is some network restriction. Maybe there is
some funny Active Directory setting which bans contact to DMZSERVER
for these machines? (But what I know about Active Directory fits on a
fingernail - and leaves most of the nail empty.)

The error message says Named Pipes, could that be a clue? Then again,
I think Named Pipes usually appears in these error messages, because
it is the last attempt.

Did you try connecting directly on the IP address to test the effect
of that?



--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #10  
Old   
firebalrog
 
Posts: n/a

Default Re: Connection Strangeness - 05-05-2010 , 11:47 AM



Yes Pinging it works with anything, 10.10.9.x, or lvac03dmz,lvac09dmz,
dmzserver all pinging works. All pings regardless of address or
address methodology resolve in 126ms or less on the t1 point to
point.


We will try forcing tcp:x\sqlexpress next I have also directed one of
the programmers to capture the execption information and post it here
once we have it caught. That might also help for diagnosis.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.