Showing posts with label tries. Show all posts
Showing posts with label tries. Show all posts

Friday, March 9, 2012

ODBC tries to connect through the wrong port

Hi,

I've been running some tests with a 3rd party application during the last few days, but the ODBC doesn′t seem to be working well.

The ODBCs are configured to go through specific ports, since there's a firewall between the server (production area) and the database (which is located in the dev area). If i press the TEST CONFIGURATION button after i configured the ODBCs, the test is successful, and the log file of the firewall monitor shows that the server is connecting through the designated ports.

But when i run the 3rd party application, the queries fail, showing an error that says "The server cannot be found or you don′t have access", after this error, another one appears, saying something like "Connection().opened..." - unfortunately I don't have the actual text, I'll try to post it as soon as i get them .

Just to make sure that the 3rd party app is doing its job, dev team wrote a simple VB6 app to query the database, and it shows the same error.

Both apps are running well in the dev environment, since dev machines don't have to go through the firewall, and both apps are using the ODBC configured in the same way as the server. I could think that the problem is the firewall, but the firewall logs show that the production server is trying to use ports 1433, 1434, 445 and 139, and there isn′t a single entry showing activity for the ports specified on the ODBCs configuration.

The database server is running SQL Server 2000, the dev pcs are running Windows 2000, and the ODBC driver version is 2000.85.1117.00.

On the Production environment the server that is trying to access the database is running Windows 2003 Server Ent Ed. SP 1 , and the ODBC driver version is 2000.86.1830.00

I hope some one outthere has any ideas to solve this problem, or at least any idea of what is causing this error, because i′m running out of them.

Thanks in advance.

Efrain Morales

The error messages are:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. 424 [Microsoft][ODBC SQL Server Driver]SQL Server does not exist or access denied.

After this one, it appears another window saying:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). 424 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())

I hope this helps, thank you

|||

Hi Efrain,

Are you trying to connect to a named instance? That would explain the 1434 UDP port activity - the client is looking for a SQL Browser / Listener service which to "resolve" the named instance to a port. Or do you have a default instance with a modified non-1433 TCP) port?

When you mention using the ODBC Administrator (where it works), are you by chance clicking the "Client Configuration" button and providing a non-dynamic port? What this does is to create an alias with the name of the server and specify the port. Depending on the client application, the alias might not be taken into account, especially if it is with the same name as the server or if this is a named instance.

What you could try is to create an alias with cliconfg.exe and name it differently, for instance <servername>_alias and fix the port. Then modify your connection string or ODBC DSN to use the alias without specifying the client configuration and see if this helps.

HTH,
Jivko Dobrev - MSFT
--
This posting is provided "AS IS" with no warranties, and confers no rights.

ODBC tries to connect through the wrong port

Hi,

I've been running some tests with a 3rd party application during the last few days, but the ODBC doesn′t seem to be working well.

The ODBCs are configured to go through specific ports, since there's a firewall between the server (production area) and the database (which is located in the dev area). If i press the TEST CONFIGURATION button after i configured the ODBCs, the test is successful, and the log file of the firewall monitor shows that the server is connecting through the designated ports.

But when i run the 3rd party application, the queries fail, showing an error that says "The server cannot be found or you don′t have access", after this error, another one appears, saying something like "Connection().opened..." - unfortunately I don't have the actual text, I'll try to post it as soon as i get them .

Just to make sure that the 3rd party app is doing its job, dev team wrote a simple VB6 app to query the database, and it shows the same error.

Both apps are running well in the dev environment, since dev machines don't have to go through the firewall, and both apps are using the ODBC configured in the same way as the server. I could think that the problem is the firewall, but the firewall logs show that the production server is trying to use ports 1433, 1434, 445 and 139, and there isn′t a single entry showing activity for the ports specified on the ODBCs configuration.

The database server is running SQL Server 2000, the dev pcs are running Windows 2000, and the ODBC driver version is 2000.85.1117.00.

On the Production environment the server that is trying to access the database is running Windows 2003 Server Ent Ed. SP 1 , and the ODBC driver version is 2000.86.1830.00

I hope some one outthere has any ideas to solve this problem, or at least any idea of what is causing this error, because i′m running out of them.

Thanks in advance.

Efrain Morales

The error messages are:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. 424 [Microsoft][ODBC SQL Server Driver]SQL Server does not exist or access denied.

After this one, it appears another window saying:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). 424 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())

I hope this helps, thank you

|||

Hi Efrain,

Are you trying to connect to a named instance? That would explain the 1434 UDP port activity - the client is looking for a SQL Browser / Listener service which to "resolve" the named instance to a port. Or do you have a default instance with a modified non-1433 TCP) port?

When you mention using the ODBC Administrator (where it works), are you by chance clicking the "Client Configuration" button and providing a non-dynamic port? What this does is to create an alias with the name of the server and specify the port. Depending on the client application, the alias might not be taken into account, especially if it is with the same name as the server or if this is a named instance.

What you could try is to create an alias with cliconfg.exe and name it differently, for instance <servername>_alias and fix the port. Then modify your connection string or ODBC DSN to use the alias without specifying the client configuration and see if this helps.

HTH,
Jivko Dobrev - MSFT
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 7, 2012

ODBC system dsn problem

We have a client that is trying to connect to a SQL DB on
a Win2003 server (thru Citrix) using a system dsn. When a
user tries connecting using the system dsn in Crystal
Reports (or anyting else for that matter), they get the
following error: data source name not found and no default
driver specified.
If you go into the ODBC manager, the data source is there
but when you try to configure it you get - dsnname is not
an existing data source name. when you click on ok you
then get - invalid dsn.
If you log onto the workstation as a user with
administrator rights, none of these errors occur.
I have looked at our Citrix machine and 2 other customer
Citrix machines that are running the same software and I
realy don't see any differences. Our's and the other 2
customers work without the user having admin privleges.
Everything points to a permissions problem but whatever it
is, is alluding me. any help at this point is appreciated.
TIA,
BillODBC entries are controlled in the registry. I would suggest using
regedt32 or regedit (if you are on Win 20003/XP), and go to
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC and try adding full control permissions
for the affected user/groups, replacing the values in the subkeys. Good
luck.
****************************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
This posting is provided "as is" with
no warranties and confers no rights.
****************************************
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Thanks Andy. I received a similar response on a SQL Mail
list that I posted to. The registry seems to have been the
problem. I changed the permissions giving access to the
everyone group. I then tested going into the odbc
configuration as one of the users that was having problems
and I no longer get an error. I have the customer testing
an Access program that has linked tables using the system
dsn.
Bill

>--Original Message--
>ODBC entries are controlled in the registry. I would
suggest using
>regedt32 or regedit (if you are on Win 20003/XP), and go
to
>HKEY_LOCAL_MACHINE\SOFTWARE\ODBC and try adding full
control permissions
>for the affected user/groups, replacing the values in the
subkeys. Good
>luck.
> ****************************************
>Andy S.
>MCSE NT/2000, MCDBA SQL 7/2000
>andymcdba1@.NOMORESPAM.yahoo.com
>Please remove NOMORESPAM before replying.
>This posting is provided "as is" with
>no warranties and confers no rights.
> ****************************************
>*** Sent via Developersdex http://www.examnotes.net
***
>Don't just participate in USENET...get rewarded for it!
>.
>