Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Backup_Restore

Backup_Restore

Scheduled Pinned Locked Moved Database
databasesharepointhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simworld
    wrote on last edited by
    #1
    1. EXEC sp_addumpdevice 'DISK','XYZ', 'c:\abc.bak' BACKUP DATABASE student_database TO XYZ WITH DESCRIPTION='def', STATS RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS EXEC SP_DBOPTION student_database,'dbo use only','false' ------------- After executing these query,when "use student_database" ---- Error message is =the database is in middle of processing...cannot use.. 2) I also want to delete sp_addumpdevice--"XYZ" and "abc.bak" after completing the task. If I delete manually the abc.bak from device, then also when going to use "EXEC sp_addumpdevice 'DISK','XYZ','c:\abc.bak'"---error message will come as it already exist. How can i solve this.
    T 1 Reply Last reply
    0
    • S simworld
      1. EXEC sp_addumpdevice 'DISK','XYZ', 'c:\abc.bak' BACKUP DATABASE student_database TO XYZ WITH DESCRIPTION='def', STATS RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS EXEC SP_DBOPTION student_database,'dbo use only','false' ------------- After executing these query,when "use student_database" ---- Error message is =the database is in middle of processing...cannot use.. 2) I also want to delete sp_addumpdevice--"XYZ" and "abc.bak" after completing the task. If I delete manually the abc.bak from device, then also when going to use "EXEC sp_addumpdevice 'DISK','XYZ','c:\abc.bak'"---error message will come as it already exist. How can i solve this.
      T Offline
      T Offline
      Tobias Schoenig
      wrote on last edited by
      #2

      simworld wrote:

      RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS

      You restore the database with the 'NORECOVERY'-option - this means that the database remains offline and in recovery-mode (normally used within database-mirroring). Remove this option and the first error-message should disappear.

      S 1 Reply Last reply
      0
      • T Tobias Schoenig

        simworld wrote:

        RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS

        You restore the database with the 'NORECOVERY'-option - this means that the database remains offline and in recovery-mode (normally used within database-mirroring). Remove this option and the first error-message should disappear.

        S Offline
        S Offline
        simworld
        wrote on last edited by
        #3

        thank u very much

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups