Solved

SQL error, cannot connect to database after restore

Posted on 2014-04-15
10
1,038 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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
 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

856 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