Search code examples
.netdatabasesql-server-2008c#-4.0backup

How to backup Sql Database Programmatically in C#


I want to write a code to backup my Sql Server 2008 Database using C# in .Net 4 FrameWork. Can anyone help in this.


Solution

  • The following Link has explained complete details about how to back sql server 2008 database using c#

    Sql Database backup can be done using many way. You can either use Sql Commands like in the other answer or have create your own class to backup data.

    But these are different mode of backup.

    1. Full Database Backup
    2. Differential Database Backup
    3. Transaction Log Backup
    4. Backup with Compression

    But the disadvantage with this method is that it needs your sql management studio to be installed on your client system.