Restore Online Database.

  • Hi All,

    Whats the T-SQL for restore the database when its online (may be someone connected to this database by Any application).

    Thanks in adv. for any input.

    Regards,

    Mohanraj Jayaraman

  • T-SQL syntax for restore is easily available on books online.

    No restore is possible if other users are connected to the database.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Okay, Thanks

    Regards,

    Mohanraj Jayaraman

  • If you want to disconnect everyone from a database so you can restore it run:

    alter database MyDatabase set offline with rollback immediate

    When the restore is completed, run:

    alter database MyDatabase set online

    Greg

  • If you have Enterprise edition, you can do some filegroup restores and bring on sections of your database, but you'd want to have designed this ahead of time.

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

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