Quantcast
Channel: Answers for "copy database script issue"
Viewing all articles
Browse latest Browse all 4

Answer by CirqueDeSQLeil

$
0
0

I believe the answer to that part is that once you restore the database to a new name, it holds a tie to the old name in some way - thus the replace is unnecessary. IN my testing, I was able to restore a database using your script multiple times. The first created the new database and subsequent overwrote that database. However, I was never able to restore the database to a database that existed prior (to testing your script) and was of a different name.

Scenario Existing Databases TestA TestB Backup TestA and restore to Test1 - no problem (db did not exist on the first attempt) Backup TestA and restore to TestB - fails every time. TestB existed and was not a restore to a new database of a different name from the TestA backup set.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images