Solved

SQL error, cannot connect to database after restore

Posted on 2014-04-15
10
1,018 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

920 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

16 Experts available now in Live!

Get 1:1 Help Now