Solved

MS SQL can't connect

Posted on 2015-02-08
3
193 Views
Last Modified: 2015-02-08
HI,

I had a server crash, and am trying to restore a classic ASP web application using an MS SQL 2008 Express database instance.

I successfully have the data tables and all intact records recovered in a new PC, with a new MS SQL installation.

The problem is, my connection file in the ASP application can no longer connect. On my login page I get:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/Connections/mande2.asp, line 20

My current connect string is:

MM_mande_STRING="Provider=SQLOLEDB;Data Source=localhost;UID=username; PWD=mypassword; database=database_name;"

Open in new window


I have a few questions, assuming that I've set up the correct user, assigned that user owner permissions on the restored database, and the user part of this is correct:

1. How do I tell if my MS SQL Server instance is "serving" to the outside world?

2. If I change the data source info from "localhost" to my actual server name and MS SQL instance "SERVER\SQLEXPRESS" the behavior changes. Instead of the error message, the page just loads forever when accessing the database from an ASP page on the site. Is this a clue of some kind? If I name this anything else (localhost, dilbert, etc) I get the error message from above.

3. Any other suggestions for checking the functionality of my new database instance and getting it reconnected?

Thank you

Bill
0
Comment
Question by:billium99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Shane Kahkola earned 500 total points
ID: 40597253
Question 1:  Determining if your db server is listening to the outside world:

1.

Go to the Windows menu --> Microsoft Sql Server 2008 --> Configuration Tools --> Sql Server Configuration Manager

2.

Drill down on Sql Server Network Configuration --> Protocols for <your instance here>

3.

Double-click on TCP/IP in the right-hand pane

4.

Make sure enabled is set to "Yes"

5.

Click on the "IP Addresses" tab and find the IP address of the server in the list

6.

Make note of the TCP Port being used (default is 1433). If it's not the default, your connection string needs to reflect that by using a :#### after the server name in the string (#### = the TCP port)

7.

Make sure the Windows firewall is permitting the specified TCP port inbound

8.

Make sure your internet firewall is permitting the specified TCP port inbound for only the IP address of your web serverQuestion 2:  Response as a clue
Yes, that is a big clue.  If your web application is not on the same server as your SQL database, then localhost will not work.  If indeed they are separate, then you have to specify the actual server name or IP address of the SQL server.

As for the long-running of the page, is it possible you have a long-running query?  Are you doing any error trapping for SqlExceptions?  What version of ASP?

Question 3:  Additional suggestions
Try opening the SQL management studio using the same username and password you specified in your string.  See if that gives you a better error message.
0
 
LVL 1

Author Closing Comment

by:billium99
ID: 40597338
Thanks for your time. The SQLEXPRESS was the correct name. I was having unrelated SSL certificate issues causing the rest of that delay.
0
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 40597348
Just glad you were able to get it resolved.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question