Solved

SQL error, cannot connect to database after restore

Posted on 2014-04-15
10
1,009 Views
Last Modified: 2014-04-15
I have a database called TVArchive in machine A and there's an service application connects to the database on the same machine.

Machine A crashed, and I built a new one and installed MSDE 2000 and the service application. The database connection from the application was OK.

Then I restored the database backup to machine A's SQL (MSDE 2000). Now when I tried to launch the service application, it says 'cannot connect to database'. I checked SQL logins and database mapping for users, all the same. Is there any database or user identity(such as GUID) that I have change for the restored database in SQL system tables?
0
Comment
Question by:crcsupport
  • 5
  • 5
10 Comments
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 500 total points
ID: 40001961
did you create an ODBC connection on the new machine ? :)
0
 
LVL 1

Author Comment

by:crcsupport
ID: 40001970
The old machine doesn't use ODBC. I checked, there's no ODBC configured.

I deleted user account under database/security and security/login and created the user account and mapped again, but it doesn't work. I think it's mapping issue between the user account and database.


aaa
0
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 500 total points
ID: 40001990
This is because you are not part of the local admin group on the windows server hosting SQL

And you have to have the rights in that database itself in security
0
 
LVL 1

Author Comment

by:crcsupport
ID: 40002016
Please ignore the image I attached, I figured it's firewall issue when I connect from another machine through SQL Management Studio. But I'm having trouble to connect from an service application to a restored database on the same machine.
0
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 500 total points
ID: 40002029
the old machine might not use an ODBC but the service application may use one.. did you check that machine the service application is on ?

My thought would be that the service application is looking for that machine or server ID when its making the db connection.

was the service application something created specifically for your business (in house) , customed devleoped outside, or is it a comsumer bought tool ?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Author Comment

by:crcsupport
ID: 40002051
It's an application for PBX phone system vendor. It's not widely used. The application version I'm installing is the same version as the old one. The old machine doesn't hava ODBC configured, how it can use ODBC when it's not configured?

You said, machine or server ID, maybe server identity of the application trying to connect to is different than old server.
0
 
LVL 22

Assisted Solution

by:plusone3055
plusone3055 earned 500 total points
ID: 40002057
if its not using an ODBC connection, there have to be some settings somewhere as to how its getting to the database.. those settings are more than likely pointing to the old server
0
 
LVL 1

Author Comment

by:crcsupport
ID: 40002062
Now I'm trying to detatch and attach to see if it's an issue with restored database
0
 
LVL 22

Accepted Solution

by:
plusone3055 earned 500 total points
ID: 40002074
that is a possibility, however your service application (forgive the pun) did not magically know how to connect to that database, there are settings somewhere or a dataconnection sheet.dat file (just an example) that make that connection.

can you give me the exact name of the application
I can possible look up its DB connection properties for you and assist even better :)
0
 
LVL 1

Author Comment

by:crcsupport
ID: 40002101
Yes, I think it's application issue. I ended up copying tables and now it's working.


Thank you plusone3055 and others.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now