Backuping Up and Restoring SQL Server with SMO
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


Backuping Up and Restoring SQL Server with...Expand / Collapse
Author
Message
Posted 03/20/2008 10:41:20 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
There have been some inquiries as to how to backup and restore SQL Server databases through an application in the field.  The best approach that we have learned for creating a reusable backup solution is to use SMO.  We have a service that runs within our medical application that automatically backs up the end-users database to a different file name each night...since they don't always do this themselves

You can modify this logic to backup and restore individual file groups.  But this sample will at least get you started and shows how to backup and restore a single database using SMO.

Note: You may need to adjust the output folder path and the server settings in order to get this sample to work for you.

  Post Attachments 
BackupAndRestoreSql.zip (22 views, 98.07 KB)

Post #15065
« Prev Topic | Next Topic »

Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:48am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 11 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.