Restoring DATABASE AND Overwriting Db (which has different name/files)

  • I have one database.

    School_Area which has mdf and ldf file school.mdf and school.mdf

    on another instance/server i have another database : classes and i took full backup of that database , classes.bak and move to the server

    and try to restore that classes database in a way it will over write contents of school_area database and replace mdf/ldf file with classes db.

    i do not want to change the name school_area but i want that db to be refresh with classes db.

    how can i do that ?

    when i tried regular ssms with replace, it give me error message saying it is in use.

  • rk1980factor (8/10/2016)


    I have one database.

    School_Area which has mdf and ldf file school.mdf and school.mdf

    on another instance/server i have another database : classes and i took full backup of that database , classes.bak and move to the server

    and try to restore that classes database in a way it will over write contents of school_area database and replace mdf/ldf file with classes db.

    i do not want to change the name school_area but i want that db to be refresh with classes db.

    how can i do that ?

    when i tried regular ssms with replace, it give me error message saying it is in use.

    Why don't you just restore classes database and then just drop the school_area database (having taken a backup first)?

  • i can do that too, but than it will drop all connection and i have to rename the file right ?

    can i restore db with new name ?

  • You can restore a database with a different name.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply