Author |
Topic |
thanksfor help
Posting Yak Master
106 Posts |
Posted - 2009-06-25 : 19:32:37
|
hi,we have 2 DB in same server one is copy of the other like A1 and A2.A1 is the original and A2 is copy. A2 is restored weekly from A1 backup file. Last restored failed and A2 is not there any more. I tried to attach the file from A2.mdf but in the list of original data and log file names are A1. Is is correct? I am not sure and stopped the database attach task.Any suggestion will be helpful.thanks in advance. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
thanksfor help
Posting Yak Master
106 Posts |
Posted - 2009-06-26 : 13:05:13
|
A1 database is fine and it is connected to production application. A2 DB got lost when restored failed from A1 backup. Now, I need A2 back again for data testing issues. AS A2.mdf was available, I thought I can attach the DB from the file but original file names were still A1.mdb and A1.ldb.Any other suggestions is also okay.thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
thanksfor help
Posting Yak Master
106 Posts |
Posted - 2009-06-26 : 14:27:46
|
Sorry, if I am not clear. both the DBs are in same server.after restore failure A2 is not in DB list.thanks for your time. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2009-06-26 : 20:47:57
|
It doesn't need to be in the list. Just run the RESTORE DATABASE command and include the WITH MOVE option. This is just an example, you'll need to make the appropriate changes:RESTORE DATABASE A2FROM DISK = 'E:\Backup\A1.bak'WITH REPLACE, MOVE 'A1_Data.mdf' TO 'F:\Data\A2_Data.mdf', MOVE 'A1_Log.ldf' TO 'F:\Data\A2_Log.ldf'Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong." |
|
|
imranwahabit
Starting Member
3 Posts |
Posted - 2009-07-01 : 11:55:33
|
hello i am mohammed imran working as a software engineer and i am haivng a sever issue,can any one of u help me out,our company database is crashed and its showing me the 5123 error,how can i recover the database plz help me out from the problem waiting for the solution from any of our brothersmy id:imranwahabit@gmail.commohammed imran |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|