June 19, 2014 at 6:44 am
Hi ,
I am having issues with Restoring the Backup of same Database on to the same server , as i know like many of you will be asking y i need to restore on same server.. Well the need came in that way , now i think i know the problem (i.e) The Orginla DB is there and also i am restoring the same DB again on that server, so .mdf and .ldf will be same .
But i dont know the solution !! Could you guys please help me out 🙂
June 19, 2014 at 6:47 am
Do you mean you want to over write the existing database or do you want to create a copy of it?
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
June 19, 2014 at 6:49 am
To speak frankly i dont want to Overwrite at all and the DB is not exact copy of the Orginal as there some data changes in some tables, so i want to keep them both and use them as seperat DBs and not like same DBs
June 19, 2014 at 6:58 am
Two of doing that then either by a script along the lines of:-
RESTORE DATABASE [NewDatabaseName] FROM TAPE = N'VNBU0-6860-7248-1403130777' WITH FILE = 1,
MOVE N'OldDbname_Data' TO N'D:\NewDatabaseName.mdf',
MOVE N'OldDbnameLog' TO N'E:\NewDatabaseName_1.ldf', NOUNLOAD, REPLACE, STATS = 10
Don't forget to change the relevant paths etc to suit your details.
or Via SSMS Task -> restore -> database and see the attached image.
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
June 19, 2014 at 7:02 am
I was using the GUI normally and i tried changing the name of Restore DB of .mdf and .ldf but still it failed and in the image that you have shown "There was a Overwrite check box highlighted" but i dont want to overwrite the two DBs..i want to keep them both ? So shall i retry without Checking the Overwrite check box ?
June 19, 2014 at 7:06 am
It's loads easier if you use TSQL as described above.
June 19, 2014 at 7:13 am
Guitar_player (6/19/2014)
....." but i dont want to overwrite the two DBs..i want to keep them both ? ...
So if you have Database1 and Database2 (for example) and want to create Database3 you type Database3 in the "To Database" box on the general tab of the restore options.
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
June 19, 2014 at 7:19 am
And don't check the "Overwrite" checkbox unless you really mean it. I also prefer using T-SQL as suggested above. It's harder to make a mistake there than in the the GUI.
June 19, 2014 at 7:34 am
So if you have Database1 and Database2 (for example) and want to create Database3 you type Database3 in the "To Database" box on the general tab of the restore options.
Yes, i tried like that .. Now i found the problem , the Path is actually different than the Orininal path like
it was "\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\Database2.mdf" be default
and i need to modify it as "\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Database2_new.mdf"
This worked fine Thank you Stuart Davies and others for your Help !!:-D 🙂
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply