We upgraded our application to .NET 4.0 a while ago, and now need to add the ability to backup SQL Server 2008 databases from the app. However, it doesn't seem that SMO is available for .NET 4. Is there a workaround or better way to perform a database backup (note that our backups need to be user initiated over a website, so we cannot schedule them).
views:
87answers:
1We'd also need to handle restoring a database as well ... is it easier to just call the SQL commands via a Connection? We were concerned about handling problems/exceptions.
Jess
2010-09-03 20:53:15
TRY/CATCH and RESTORE DATABASE?
gbn
2010-09-03 21:12:30
Cool, I had no idea you could do a try/catch within T-SQL
Jess
2010-09-04 01:58:59