Run sql server 2005 backup from VB.net 2005

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

Hi All

How do you run a backup / restore on sql server 2005 from within a VB.net
2005 application

In VB6 I used an execmd routine to run OSQL in cmd shell

In VB.net 2005 is there a better way to do it??


Regards
Steve
 
Hi Steve,

In VB.NET 2005 and SQL2005, you can use SMO to achieve the backup and
restore process. The Backup and Restore classes will help you out of there.
Please check the following links for more information.

http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.
backup.aspx
http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.
restore.aspx

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
You're welcome.

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top