Click here to Skip to main content
16,016,022 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Sorry, help please with this

If I have an instance with multiple tables and it is damaged, and create a new instance to create a database that I can not access in the first instance

Try to restore a backup of the database that already had in the first instance to the second instance but I mark error saying that already exists that database then my doubts would be:

1) the 2 instances are connected only in the databases ( if I do something on a base the 2 instances is affected)

2) but if deleting one instance does not affect the other or if

3) If you let me know that it already exists, because I can not see the database in the new instance

Thank you

What I have tried:

1)Repair the instance

2)To create new instance to access the existing database on the faulty instance
Posted
Updated 17-Apr-17 7:31am

Backups normally restore to the original database, not to a new one - and the name of the DB and it's tables are recorded in the backup file for just that reason.
See here: backup - How to restore to a different database in sql server? - Stack Overflow[^] - it should help.
 
Share this answer
 
If I understand the problem correctly you should be able to restore the backup to a different instance than where it's taken from. Typically a database does not contain any relation to the instance. However, if the database contains functionality that uses instance specific services, then you would need those services also in the new instance or to be able to call the original instance.

Have a look at Restore a Database to a New Location (SQL Server) | Microsoft Docs[^]
 
Share this answer
 
Many thanks friends
I'll check it
 
Share this answer
 
Comments
RedDk 17-Apr-17 13:50pm    
There are a lot of cases where you won't be able to "reup" a database usg the instances' database files (those .mdf/.ldf located behind that dissed MSSQL10.<title>) in any other way than to, as you've hinted in your Q post, "with multiple tables", create the bare skeleton of the table structure first, then repopulate that skeleton with the leaves of "value" (sic).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900