| Author |
Topic |
|
fatsmm
Starting Member
3 Posts |
Posted - 2005-03-10 : 13:30:23
|
| sql server connection problem i am using asp/vbscript to access an sql databaseresiding on another server. i get the following error :-------------------------------------Microsoft OLE DB Provider for SQL Server error '80004005' [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. /checkid_index.asp, line 25 -----------------------------------given below is the code for checkid_index.asp----------------------------------dim conn,rs,strsqlSet conn=Server.CreateObject("ADODB.Connection") 'Standard strings i used one by one all worked on localhost' Conn.connectionstring ="PROVIDER=SQLOLEDB;DATA SOURCE=xxx.xxx.xxx.xxx;UID=xxxxx;PWD=xxxxx;DATABASE=xxxxx" ' Conn.connectionstring="driver={SQL Server};server=xxx.xxx.xxx.xxx;uid=xxxxx;pwd=xxxxx;database=xxxxx"'Network Library and port 1433......another one which worked on localhost' conn.connectionstring = "Provider=sqloledb;Data Source=xxx.xxx.xxx.xxx,1433;Network Library=DBMSSOCN;Initial Catalog=reg_mumineen;User ID=xxxxxx;Password=xxxxxx" 'Trusted connection:..............this string also works on localhostconn.ConnectionString="Provider=SQLOLEDB; Data Source=xxx.xxx.xxx.xxx;Initial Catalog=reg_mumineen; User ID=xxxxxx; Password=xxxxxx; Integrated Security=SSPI;" conn.openerror is on last line which is line 25 when i uploadedi have tried all the strings listed above, they work on localhost IIS 5 but nothing works on my website when i upload,connection is successfull on localhost and i can retrive data through stored procedures thereafter.i have also usedconn.open varstringwhere varstring is the connection string above.only on website this does not work.please pls help. is there a problem with the server i am connecting too or with the ISP. HELP<edit> removed actual login info to prevent your server from being hacked </edit> |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-10 : 13:40:39
|
| Well, I had no trouble connecting to it just now.This is some friendly advice, DO NOT POST your actual IP address, user name and password. Replace them with XXX's or something like that. You just gave a hacker the keys to your SQL Server.As far as your problem, I'd suspect you have a firewall someplace between your computer and the internet that blocks that IP or that port, or both. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-10 : 13:48:00
|
| Can you connect to the web server (e.g. terminal services) and PING the SQL box? if not all bets are off ...Your integrated security presumably won't work from the web box - it will use the UserName of the login to the Web Server, and not the UserID/Password in your connect string. You can't use your own credentials via that route - unless YOU are the login for the web server ...So, you would either need to set up an appropriate account on the SQL Box for the Web Box's normal login (Probably IUSR_WAM or somesuch, but I don't know for sure), OR you would need to make sure you SQL box takes normal non-integrated logins, and use a non-trusted type connection string - like your first example.You could experiement with other connection strings, these guys have a fair collection:http://www.able-consulting.com/ADO_Conn.htmKristen |
 |
|
|
fatsmm
Starting Member
3 Posts |
Posted - 2005-03-10 : 14:05:25
|
| hey thanks a lot....there is a firewall, so i will work on it.one more request : will u pls delete this posting as it might get into wrong hands. i will really appreciate this. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-11 : 00:38:50
|
| "will u pls delete this posting"I doubt the Mods have time to do that, but you can modify your posting using the "Edit Reply" icons against your postingsKristen |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-11 : 07:54:04
|
| I've already edited out the relevant information. |
 |
|
|
fatsmm
Starting Member
3 Posts |
Posted - 2005-03-11 : 12:55:38
|
| thanks a lot "rob". i really appreciate thismy problem is not solved yet. still working on it. are there any other ports apart from 1433 that can be used. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-12 : 00:41:44
|
| Any port CAN be used, but SQL Server has to be set up specifically to use them - so it would have had to be a deliberate choice.(Suggest you change your password on that server, just in case)Kristen |
 |
|
|
wowotoe
Starting Member
2 Posts |
Posted - 2005-04-06 : 14:06:58
|
| fatsmm, did you ever get your problem solved?I just started to see this problem happens to my website too. Like your settings, the websites are sitting on DMZ and the SQL is located internally. SQL ports are opened properly. This error just started yesterday. The weird thing is we have two websites that access the same SQL server. One works perfectly and the other has this SQL connection error when try to access the asp pages that needs to have access to the sql server. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-04-08 : 13:27:11
|
| SQL running on Windowx XP that has just had SP2 installed?(Sounds like its running on a "proper" server, rather than a workstation, but just thought I'd ask)Kristen |
 |
|
|
wowotoe
Starting Member
2 Posts |
Posted - 2005-04-08 : 13:37:25
|
| Both the websites and SQL are running on Win2K platform. While I'm doing a research on the website, I noticed there are many people with this problem on Win2003 server. (http://www.webservertalk.com/showthread.php?threadid=254594&perpage=10&pagenumber=1) However, this problem occurs on Win2k machines in my case. Just weird that why suddenly the SQL connection breaks without making any change to it. |
 |
|
|
|