ODBC connection to SQL box - odd one
ODBC connection to SQL box - odd one
Author
Discussion

aldi

Original Poster:

9,288 posts

267 months

Thursday 20th April 2006
quotequote all
Create the connection to 192.168.0.2 - no problems
Create the connection to TheServer.OurDomain.local - no problems
Create the connection to TheServer - No Worky. Could not be contected/access denied.

Ping TheServer - worky. Correct IP.

Odd, yes?? The obiouls answer here is to just do it in a way that works, but its not that easy unfortunatley

This is only on one machine BTW, on the same DHCP & AD as the rest. Any ideas?

NWMark

530 posts

246 months

Thursday 20th April 2006
quotequote all
Have you tried creating an alias using the network client util. or if its not installed creating an entry in the HOSTS file.

Mark

Don

28,378 posts

314 months

Thursday 20th April 2006
quotequote all
Have you checked what networking components have been installed on the troublesome box? Sounds like something to do with NetBIOS or similar...

mattley

3,039 posts

252 months

Thursday 20th April 2006
quotequote all
Is SQL definately started on the server? Is your connection string all correct? are you supplying good credentials? Can you connect using the SQL server client, or enterprise manager?

225

1,331 posts

256 months

Thursday 20th April 2006
quotequote all
Are you using SQl or NT authentication? SOunds like an authentication issue to me, also is the server behind a firewall if so are the correct ports open?

aldi

Original Poster:

9,288 posts

267 months

Thursday 20th April 2006
quotequote all
Yep tried the hosts file, not got any client utils on this box here but that might be a good next step.

Its very strange, don't think its authentication because literally all I'm changing is the server name from server to server.domain.local and it works, no other options are touched. Yet I can ping server no problem, resolves to correct IP. The server is definatley up etc. cause umpteen other people are logged into it from the same app from the same n/w install. I'l install the client utils and have a play around....

mattley

3,039 posts

252 months

Thursday 20th April 2006
quotequote all
Or in excel, Data => import external data => new database query, select your DSN, and the database should be available, any errors there can be a little more verbose and usefull.

aldi

Original Poster:

9,288 posts

267 months

Thursday 20th April 2006
quotequote all
mattley said:
Or in excel, Data => import external data => new database query, select your DSN, and the database should be available, any errors there can be a little more verbose and usefull.


Sweet, verbose would be good. 'Could not connect or access is denied' doesnt rule much out does it

Cheers for the suggestions all!!

sybaseian

1,826 posts

305 months

Thursday 20th April 2006
quotequote all
you could try the old fashioned way - via cmd line

open a cmd window and type the following if you have the client tools installed on the machine :-

isql -U<username> -P<password> -S<sql servername>

if you get an isql command prompt back, you have a valid sql login.

now run this to confirm that you are on the correct SQL Server


1> select @@servername
2> go


If you can't login this way, you need to get a valid login correctly created. If you have a valid login, it's liklely that you set up the ODBC connection incorrectly or it may be a DNS issue not being correctly resolved. If the SQL Server is running on a cluster, you need to point to port 1433 by ticking that option in the odbc settings or you won't be able to login to the SQL server.