![]() ![]() To do that create a Windows Forms application and drag and drop the following control onto the form. The SQL Server query above returns the server name and all database names. The backup of the student database has been created on the given location. ![]() Backup database Student to disk='E:/test.bak' If you want to create a backup of the database just execute the following Query in SQL Server Management Studio. The following Query gives the name of the Database and the server name: Select * from sysservers where srvproduct='SQL Server' The example is developed in Visual Studio 2010. So let's have a look at a practical example of how to create it using C#. To do it using SQL Server Management Studio: ![]() We use a backup database and restore the database when our database becomes corrupted or crashes. You can create a SQL Server database backup using SQL Server Management Studio and you can also use a Transact-SQL statement. In this article, I would like to show how to create a SQL Server Backup file in C#. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |