Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 9th, 2004, 12:33 PM
ngandy ngandy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 ngandy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Cannot establish a connection to SQL Server 2K sp3a remotely

Cannot establish a connection to SQL Server 2K sp3a remotely

Ok, here's the scenario.

1. Windows Server 2003 Standard running SQL Server 2000 sp3a
2. Windows Server 2003 Standard (where the website sits)
3. This is not a network, the connections are over the Net
4. I have set up SQL Server 2k to allow for TCP/Named Pipes listening.

checking the SQL Logs I see the following:
(note: I replaced private information with "x's")
------------------------

2004-03-09 10:39:51.39 server Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: )

2004-03-09 10:39:51.39 server Copyright (C) 1988-2002 Microsoft Corporation.
2004-03-09 10:39:51.39 server All rights reserved.
2004-03-09 10:39:51.39 server Server Process ID is 3252.
2004-03-09 10:39:51.39 server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL\log\ERRORLOG'.
2004-03-09 10:39:51.39 server SQL Server is starting at priority class 'normal'(1 CPU detected).
2004-03-09 10:39:51.62 server SQL Server configured for thread mode processing.
2004-03-09 10:39:51.62 server Using dynamic lock allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2004-03-09 10:39:51.64 server Attempting to initialize Distributed Transaction Coordinator.
2004-03-09 10:39:53.65 spid3 Starting up database 'master'.
2004-03-09 10:39:53.95 server Using 'SSNETLIB.DLL' version '8.0.766'.
2004-03-09 10:39:54.21 server SQL server listening on x.x.x.x: 1433.
2004-03-09 10:39:54.21 server SQL server listening on 127.0.0.1: 1433.
2004-03-09 10:39:54.23 spid5 Starting up database 'model'.
2004-03-09 10:39:54.26 spid3 Server name is 'xxxxxxx'.
2004-03-09 10:39:54.26 spid8 Starting up database 'msdb'.
2004-03-09 10:39:54.26 spid9 Starting up database 'pubs'.
2004-03-09 10:39:54.26 spid10 Starting up database 'Northwind'.
2004-03-09 10:39:54.26 spid11 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:55.12 spid5 Clearing tempdb database.
2004-03-09 10:39:55.23 spid9 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:55.60 spid10 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:56.48 server SQL server listening on TCP, Shared Memory, Named Pipes.
2004-03-09 10:39:56.48 server SQL Server is ready for client connections
2004-03-09 10:39:56.53 spid5 Starting up database 'tempdb'.
2004-03-09 10:39:56.64 spid3 Recovery complete.
2004-03-09 10:39:56.64 spid3 SQL global counter collection task is created.

------------------------

Ok, so I try to connect via ASP, ASP.NET, ODBC, Enterprise Manager all from the Web server.
In every attempt, I get access denied messages.

On the SQL Server box, I went into a command prompt and ran the following command:
ISQL -Stcp:SQLServerNameHere -E -Q"select @@version"

This ran fine. Here is the result:
-------------
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copy
right (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows
NT 5.2 (Build 3790: )

(1 row affected)
-------------

I also ran the following command:
netstat -an

This ran fine with the following results:
(note: I replaced private information with "x's")

-----------------
Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING
TCP 0.0.0.0:25 0.0.0.0:0 LISTENING
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:99 0.0.0.0:0 LISTENING
TCP 0.0.0.0:110 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:143 0.0.0.0:0 LISTENING
TCP 0.0.0.0:366 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:465 0.0.0.0:0 LISTENING
TCP 0.0.0.0:993 0.0.0.0:0 LISTENING
TCP 0.0.0.0:995 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1101 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5222 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5223 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5269 0.0.0.0:0 LISTENING
TCP 0.0.0.0:32000 0.0.0.0:0 LISTENING
TCP 0.0.0.0:32001 0.0.0.0:0 LISTENING
TCP x.x.x.x:110 66.25.183.245:33080 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33401 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33448 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33555 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33564 TIME_WAIT
TCP x.x.x.x:139 0.0.0.0:0 LISTENING
TCP x.x.x.x:1330 x.x.x.x:1433 TIME_WAIT
TCP x.x.x.x:3389 66.25.183.245:33260 ESTABLISHED
UDP 0.0.0.0:445 *:*
UDP 0.0.0.0:500 *:*
UDP 0.0.0.0:1106 *:*
UDP 0.0.0.0:1107 *:*
UDP 0.0.0.0:1258 *:*
UDP 0.0.0.0:1259 *:*
UDP 0.0.0.0:1434 *:*
UDP 0.0.0.0:4500 *:*
UDP x.x.x.x:123 *:*
UDP x.x.x.x:137 *:*
UDP x.x.x.x:138 *:*
UDP 127.0.0.1:123 *:*
----------------

The Windows 2003 Firewall is DISABLED for both machines.

When I attempt to set up an ODBC connection from the Web Server, I get the following error:

----------------------------
Connection Failed:
SQLState: '01000'
SQL Server Error: 10051
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
----------------------------

Now, I attempted to set up the SAME ODBC connection on the SQL Server box, with the same login credentials (both using SQL Server Authentication), and it worked fine.

So, as far as I can tell, the SQL Server box is listening on port 1433. I have all the usernames/passwords set up for each DB. I can set all this up on the local box.

The SQL Server used to house the web server as well so there doesn't seem to be any firewall or connection issues going INTO the box (again, Internet Firewall is turned OFF on both machines).

I have also run the following command from the command prompt on both machines:

ISQL -Stcp:ServerNameHere -Uxxxxxx -Pxxxxxx -Q"select @@version"

On the SQL Server Box, I get a good return message, on the Web Server I get the following message:

--------------------------
C:\>ISQL -Stcp:66.135.32.79 -Usa -Pxxxxxx -Q"select @@version"
DB-Library: Unable to connect: SQL Server is unavailable or does not exist. Una
ble to connect: SQL Server does not exist or network access denied.
Net-Library error 10051: ConnectionOpen (Connect()).
--------------------------

Can anyone help? I appreciate your help!

Thanks in advance!

Nigel Gandy

Reply With Quote
  #2  
Old March 12th, 2004, 02:05 PM
pixel696 pixel696 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 23 pixel696 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 9 sec
Reputation Power: 0
could you be using MSDE ????

...did you install MSDE ... and not SQL Server ???

Reply With Quote
  #3  
Old March 12th, 2004, 04:38 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
My guess is your sql server is set to accept windows authentication only, so when you try to connect remotely the user account of the remote computer is not available on the sql server computer.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #4  
Old September 17th, 2004, 08:43 PM
liukang97 liukang97 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 liukang97 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 sec
Reputation Power: 0
I have the exactly same pb...Since March, any news which can helps me...
Thanks

Reply With Quote
  #5  
Old October 19th, 2004, 02:35 PM
pelos pelos is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 pelos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation

I have the same problem in two clients.
The las thing that I probe is register the SQL server in the local enterprice manager
with other alias than (local), in fact, the alias of the SQL server now is the ip address and it work
right.
In other hand i dont know yours escenarios but you probably are conected to internet and behind a firewall
be care about the port to use by SQL, it must be open in firewall.
I hope that this info help you all.

Reply With Quote
  #6  
Old October 21st, 2004, 02:09 AM
Leslie's Avatar
Leslie Leslie is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Honolulu
Posts: 184 Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 20 h 29 m 2 sec
Reputation Power: 9
First of all, where are you getting this error? From a conection string in an applicaiton or from an attempt to create an ODBC data source in Windows using Control Panel, Administrative Tools, ODBC? Big dfference. IF you cannot do the ODBC data source, are you useing SQL Server authentication or NT (Windows) authentication? IF it's SQL Server auth and you cannot create the windows DSN then you have a network problem. Verify that the webserver is really on the network and can ping another server. Try ping both ways.

If you are using Windows authentication you may have a domain problem, like the new webserver computer is not part of the samd domain or is not set up right.

IF you CAN creaet this type of connection (Windows DSN) yet your applicaiton cannot connect using a connection string, then you have a syntax problem. Perhaps the provider used in the connection string is pointing to a version of a driver that is not the same on the new webserver as it used to be on the old webserver. Versions of drivers matter. Every so often a connection string will change with a new version of a driver which means progammers have to go through and modfy their code for the new connections tring.

Reply With Quote
  #7  
Old January 19th, 2005, 03:54 AM
Ilan Ilan is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 Ilan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Hopefully this can help

Hi, I think I just solved this one, it's been bugging me for two months and the solution for me was a bit too simple.
But, anyway, it could work for you (let me know)
Thats how it goes:

Go to The Microsoft SQL Server program Group
Open Server Network Utility
Change the TCP/IP port from 1433 to anything (pick something safe above 1000)
Restart the SQL Service
Open Server Network Utility
Change the TCP/IP port back to 1433
Restart the SQL Service

Done, for me it did the trick.
Ilan



Quote:
Originally Posted by ngandy
Cannot establish a connection to SQL Server 2K sp3a remotely

Ok, here's the scenario.

1. Windows Server 2003 Standard running SQL Server 2000 sp3a
2. Windows Server 2003 Standard (where the website sits)
3. This is not a network, the connections are over the Net
4. I have set up SQL Server 2k to allow for TCP/Named Pipes listening.

checking the SQL Logs I see the following:
(note: I replaced private information with "x's")
------------------------

2004-03-09 10:39:51.39 server Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: )

2004-03-09 10:39:51.39 server Copyright (C) 1988-2002 Microsoft Corporation.
2004-03-09 10:39:51.39 server All rights reserved.
2004-03-09 10:39:51.39 server Server Process ID is 3252.
2004-03-09 10:39:51.39 server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL\log\ERRORLOG'.
2004-03-09 10:39:51.39 server SQL Server is starting at priority class 'normal'(1 CPU detected).
2004-03-09 10:39:51.62 server SQL Server configured for thread mode processing.
2004-03-09 10:39:51.62 server Using dynamic lock allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2004-03-09 10:39:51.64 server Attempting to initialize Distributed Transaction Coordinator.
2004-03-09 10:39:53.65 spid3 Starting up database 'master'.
2004-03-09 10:39:53.95 server Using 'SSNETLIB.DLL' version '8.0.766'.
2004-03-09 10:39:54.21 server SQL server listening on x.x.x.x: 1433.
2004-03-09 10:39:54.21 server SQL server listening on 127.0.0.1: 1433.
2004-03-09 10:39:54.23 spid5 Starting up database 'model'.
2004-03-09 10:39:54.26 spid3 Server name is 'xxxxxxx'.
2004-03-09 10:39:54.26 spid8 Starting up database 'msdb'.
2004-03-09 10:39:54.26 spid9 Starting up database 'pubs'.
2004-03-09 10:39:54.26 spid10 Starting up database 'Northwind'.
2004-03-09 10:39:54.26 spid11 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:55.12 spid5 Clearing tempdb database.
2004-03-09 10:39:55.23 spid9 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:55.60 spid10 Starting up database 'xxxxxxxx'.
2004-03-09 10:39:56.48 server SQL server listening on TCP, Shared Memory, Named Pipes.
2004-03-09 10:39:56.48 server SQL Server is ready for client connections
2004-03-09 10:39:56.53 spid5 Starting up database 'tempdb'.
2004-03-09 10:39:56.64 spid3 Recovery complete.
2004-03-09 10:39:56.64 spid3 SQL global counter collection task is created.

------------------------

Ok, so I try to connect via ASP, ASP.NET, ODBC, Enterprise Manager all from the Web server.
In every attempt, I get access denied messages.

On the SQL Server box, I went into a command prompt and ran the following command:
ISQL -Stcp:SQLServerNameHere -E -Q"select @@version"

This ran fine. Here is the result:
-------------
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copy
right (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows
NT 5.2 (Build 3790: )

(1 row affected)
-------------

I also ran the following command:
netstat -an

This ran fine with the following results:
(note: I replaced private information with "x's")

-----------------
Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING
TCP 0.0.0.0:25 0.0.0.0:0 LISTENING
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:99 0.0.0.0:0 LISTENING
TCP 0.0.0.0:110 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:143 0.0.0.0:0 LISTENING
TCP 0.0.0.0:366 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:465 0.0.0.0:0 LISTENING
TCP 0.0.0.0:993 0.0.0.0:0 LISTENING
TCP 0.0.0.0:995 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1101 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5222 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5223 0.0.0.0:0 LISTENING
TCP 0.0.0.0:5269 0.0.0.0:0 LISTENING
TCP 0.0.0.0:32000 0.0.0.0:0 LISTENING
TCP 0.0.0.0:32001 0.0.0.0:0 LISTENING
TCP x.x.x.x:110 66.25.183.245:33080 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33401 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33448 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33555 TIME_WAIT
TCP x.x.x.x:110 66.25.183.245:33564 TIME_WAIT
TCP x.x.x.x:139 0.0.0.0:0 LISTENING
TCP x.x.x.x:1330 x.x.x.x:1433 TIME_WAIT
TCP x.x.x.x:3389 66.25.183.245:33260 ESTABLISHED
UDP 0.0.0.0:445 *:*
UDP 0.0.0.0:500 *:*
UDP 0.0.0.0:1106 *:*
UDP 0.0.0.0:1107 *:*
UDP 0.0.0.0:1258 *:*
UDP 0.0.0.0:1259 *:*
UDP 0.0.0.0:1434 *:*
UDP 0.0.0.0:4500 *:*
UDP x.x.x.x:123 *:*
UDP x.x.x.x:137 *:*
UDP x.x.x.x:138 *:*
UDP 127.0.0.1:123 *:*
----------------

The Windows 2003 Firewall is DISABLED for both machines.

When I attempt to set up an ODBC connection from the Web Server, I get the following error:

----------------------------
Connection Failed:
SQLState: '01000'
SQL Server Error: 10051
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
----------------------------

Now, I attempted to set up the SAME ODBC connection on the SQL Server box, with the same login credentials (both using SQL Server Authentication), and it worked fine.

So, as far as I can tell, the SQL Server box is listening on port 1433. I have all the usernames/passwords set up for each DB. I can set all this up on the local box.

The SQL Server used to house the web server as well so there doesn't seem to be any firewall or connection issues going INTO the box (again, Internet Firewall is turned OFF on both machines).

I have also run the following command from the command prompt on both machines:

ISQL -Stcp:ServerNameHere -Uxxxxxx -Pxxxxxx -Q"select @@version"

On the SQL Server Box, I get a good return message, on the Web Server I get the following message:

--------------------------
C:\>ISQL -Stcp:66.135.32.79 -Usa -Pxxxxxx -Q"select @@version"
DB-Library: Unable to connect: SQL Server is unavailable or does not exist. Una
ble to connect: SQL Server does not exist or network access denied.
Net-Library error 10051: ConnectionOpen (Connect()).
--------------------------

Can anyone help? I appreciate your help!

Thanks in advance!

Nigel Gandy

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Cannot establish a connection to SQL Server 2K sp3a remotely


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT