Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Atlanta, GA
    Posts
    2

    Unanswered: Using DMO to restore to new database and physical file

    I have been trying to use DMO(C++) to backup a database and then restore from that backup to a new db name AND physical data and log files, with no success. I have been able to successfully restore the backup to the same database and change the physical file names using the RelocateFiles property on the Restore object, but not change both.
    Any help would be greatly appreciated.

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578

  3. #3
    Join Date
    Mar 2004
    Location
    Atlanta, GA
    Posts
    2

    I tried the first link and the app has the same problem I ran into. The first database still exists on the server, so when I try to restore to a new db name, DMO reads the physical file location from the backup, which is the same as the physical file for the existing db. The "trick" i'm looking for, is how to change the physical file location in the backup, so there is no conflict on restore and essentially I end up with two copies of the same database on the same server.
    I appreciate the link, though, gives me an introduction to using C# with DMO!

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Try to contact Nigel for such tips.#
    HTH
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •