Link to home
Start Free TrialLog in
Avatar of logicalc
logicalcFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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?
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

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/
Create a stored procedure on SQL Server side and then run the stored procedure on VB.NET side in your code
Avatar of logicalc

ASKER

YZlat's idea looks interesting, as I am seeking something very simple.

Do you have an example please?
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Many thanks