views:

87

answers:

1

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).

+2  A: 

Use BACKUP DATABASE?

Otherwise, try these One, Two

gbn
We'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
TRY/CATCH and RESTORE DATABASE?
gbn
Cool, I had no idea you could do a try/catch within T-SQL
Jess