Back Up MsSql 2005 Using C# Code
-
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 ...
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"); }
-
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"); }
-
BackUp is Created but Dont Know the format..what format is to adopted by which we can restore it easily..
simply backupfile.bak
Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan