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. General Programming
  3. C#
  4. Restore database with stored procedure

Restore database with stored procedure

Scheduled Pinned Locked Moved C#
databasehelpsql-servercomsysadmin
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.
  • N Offline
    N Offline
    nhanlaptrinh
    wrote on last edited by
    #1

    I am doing an assignment on Backup + Restore database with Stored Procedures. Backup is ok, but Restore the error: "RESTORE cannot process database 'db_test' because it is in use by this session. It is recommended that the master database be used when performing this operation.". I tried to fix but the document has not been, hope admin help with this problem. Thanks! Link source: http://www.mediafire.com/?c1uldq2t7eczw3b I use C # VS2010 + sql server 2005.

    A 1 Reply Last reply
    0
    • N nhanlaptrinh

      I am doing an assignment on Backup + Restore database with Stored Procedures. Backup is ok, but Restore the error: "RESTORE cannot process database 'db_test' because it is in use by this session. It is recommended that the master database be used when performing this operation.". I tried to fix but the document has not been, hope admin help with this problem. Thanks! Link source: http://www.mediafire.com/?c1uldq2t7eczw3b I use C # VS2010 + sql server 2005.

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      You are restoring a database that you are also probably using at the same time. Try making sure you run a restore in the master database.

      N 1 Reply Last reply
      0
      • A Abhinav S

        You are restoring a database that you are also probably using at the same time. Try making sure you run a restore in the master database.

        N Offline
        N Offline
        nhanlaptrinh
        wrote on last edited by
        #3

        I used sql queries Restore is done, but 'Stored Procedures' are not. So I asked to use the 'Stored Procedures' can not do this. And if so please help me modifying my demo about Restore using 'Stored Procedures' . Thank you very much. Link: http://www.mediafire.com/?c1uldq2t7eczw3b

        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