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. Back Up MsSql 2005 Using C# Code

Back Up MsSql 2005 Using C# Code

Scheduled Pinned Locked Moved C#
csharpdatabasesql-servertutorial
4 Posts 3 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.
  • R Offline
    R Offline
    Rahul DSG
    wrote on last edited by
    #1

    I m developing an application using C#.Net 2005 and MsSql 2005. How to take backup of specific database in MsSql(Using C#) and then how to Restore the backup ...

    S 1 Reply Last reply
    0
    • R Rahul DSG

      I m developing an application using C#.Net 2005 and MsSql 2005. How to take backup of specific database in MsSql(Using C#) and then how to Restore the backup ...

      S Offline
      S Offline
      seoamitk
      wrote on last edited by
      #2

      SqlConnection connection = new SqlConnection("Connectionstring"); SqlCommand command = new SqlCommand("BACKUP DATABASE databasename TO DISK = 'path of destination'", connection); int effect = command.ExecuteNonQuery(); if (effect < 0) { MessageBox.Show("Back Up Created"); }

      R 1 Reply Last reply
      0
      • S seoamitk

        SqlConnection connection = new SqlConnection("Connectionstring"); SqlCommand command = new SqlCommand("BACKUP DATABASE databasename TO DISK = 'path of destination'", connection); int effect = command.ExecuteNonQuery(); if (effect < 0) { MessageBox.Show("Back Up Created"); }

        R Offline
        R Offline
        Rahul DSG
        wrote on last edited by
        #3

        BackUp is Created but Dont Know the format..what format is to adopted by which we can restore it easily..

        A 1 Reply Last reply
        0
        • R Rahul DSG

          BackUp is Created but Dont Know the format..what format is to adopted by which we can restore it easily..

          A Offline
          A Offline
          Abdul Rahman Hamidy
          wrote on last edited by
          #4

          simply backupfile.bak

          Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan

          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