February 25, 2010 at 11:25 pm
Hi,
Im currently using SQL server 2000 and 2005. I had copied the pubs database into sql 2005 and i have a pub backup file. Now my question is, I had created a new database first called "Mydb" and I want the pubs.bak file to be copied into the new database called mydb can it be possible?
Thanks,
Ravi Shankar.
February 26, 2010 at 12:52 am
You can restore the backup of pub DB with another name (can be myDB)
but if you have a DB already created, it is not at all possible to restore backup of 1DB into another.
SQL Server Overwrites the Database if the DB already exists with the same name.
Regards,
Sarabpreet Singh 😎
Sarabpreet.com
SQLChamp.com
Twitter: @Sarab_SQLGeek
February 26, 2010 at 12:54 am
I agree, take the current backup and rather restore it as the new name.
This will keep structure etc i place.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
February 26, 2010 at 1:12 am
Sarab. (2/26/2010)
You can restore the backup of pub DB with another name (can be myDB)but if you have a DB already created, it is not at all possible to restore backup of 1DB into another.
SQL Server Overwrites the Database if the DB already exists with the same name.
If the database exists, you can restore a different database over the top of it. The two will not merge, an overwrite will occur. When doing this, you must ensure that filenames are renamed and the overwrite option is selected. When doing the restore, the existing database name will remain and the schema from the backup will be applied.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 26, 2010 at 8:58 am
Appreciate you all for your response ..
but can any one tell me how to overwrite a already created database with a backup file.
Thanks & Regards,
Ravi Shankar
February 26, 2010 at 9:15 am
RaviShankar1234 (2/26/2010)
Appreciate you all for your response ..but can any one tell me how to overwrite a already created database with a backup file.
Thanks & Regards,
Ravi Shankar
Here's an article with the steps.
http://msdn.microsoft.com/en-us/library/ms177429.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 26, 2010 at 12:12 pm
Cool Got it!!!!!!
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply