Solved

GoDaddy Hosted Website Built in SQL 2005 Not Functioning After Restore from .BAK

Posted on 2012-03-29
4
407 Views
Last Modified: 2012-03-30
Due to some staff changeover, we weren't notified when our Website came up for renewal and GoDaddy killed the site. We've since re-upped on our hosting account and had the site restored but since it was built in SQL 2005 a long time ago, we don't know/have the original SQL credentials. The developers of the site are long gone.

After forking over $150, GoDaddy gave us a .BAK file to use to restore the SQL Server 2005 database to the hosting account. On their account portal we were told to create a new database and then restore the original database over the new one using the .BAK file(s) they restored. We did that and the restore was successful... we see our database files, but nothing works. We assume it's not working because we couldn't match the original SQL credentials with the new ones we created when we started over with the new database that we restored over. If that makes sense.

This is the error we get:


A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

What can we do? Is there a way to match the credentials somehow?
0
Comment
Question by:philodendrin
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
TonyReba earned 500 total points
ID: 37782706
Seems that your website is built on ASP.NET,  have you looked in your web.config file and changed the connection string to the  new sql server???
0
 

Author Comment

by:philodendrin
ID: 37782802
We have not... and you are definitely pointing us in the right direction.

We located the web.config file and here's what's in it (passwords crossed out).

So, what do we match or change? The "initial catalog" user ID and passwords that I crossed out here are different than the login credentials. And what we created within the GoDaddy portal is different from everything in the original file.

 </system.web>
  <connectionStrings>
    <add name="ConnectionString" connectionString="Data Source=p3swhsql-v17.shr.phx3.secureserver.net;Initial Catalog=XXXXX;uid=XXXXXX;pwd=XXXXX"
    providerName="System.Data.SqlClient" />
   
  </connectionStrings>
 <system.web>
    <authentication      mode="Forms">
      <forms name="MYWEBAPP.ASPXAUTH" loginUrl="login.aspx" protection="All" path="/admin/" >
<credentials passwordFormat="Clear">
                    <user name="XXXXXX" password="XXXXXX" />
                </credentials>
            </forms>
    </authentication>
    <authorization>
      <allow users="*"/>
      <deny users="?"/>

    </authorization>
   
  </system.web>
</configuration>
0
 

Author Closing Comment

by:philodendrin
ID: 37785192
I got it figured out. Needed to get the proper Database Connection String to edit the Web.Config file you pointed me to. Thanks for the clue!
0
 
LVL 9

Expert Comment

by:TonyReba
ID: 37787569
Glad you got it working
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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