[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 768
  • Last Modified:

How to back up SQL database in VB.NET?

I want to provide an interface via VB.NET to allow the user to back up the SQL Server database.

How can I do this please? SQL Server may be any version from 2000+. Am using VB.NET 2008

If there are other users of the database, can I find their user names, so that I can tell the user to ask them to log off first?
0
logicalc
Asked:
logicalc
  • 2
  • 2
1 Solution
 
DhaestCommented:
SQL Server Database Backup Utility using VB.NET and SQL-DMO (New version)
http://www.codeproject.com/KB/dotnet/SQL_Server_backup.aspx

Simple Backup/Restore Utility With SQL-DMO Using VB.NET
http://www.aspfree.com/c/a/VB.NET/Simple-BackupRestore-Utility-With-SQLDMO-Using-VBNET/
0
 
YZlatCommented:
Create a stored procedure on SQL Server side and then run the stored procedure on VB.NET side in your code
0
 
logicalcAuthor Commented:
YZlat's idea looks interesting, as I am seeking something very simple.

Do you have an example please?
0
 
DhaestCommented:
Backup databases stored procedure
http://weblogs.sqlteam.com/tarad/archive/2007/02/26/60120.aspx

Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27

0
 
logicalcAuthor Commented:
Many thanks
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now