Freitag, 3. Februar 2012 17:49
I would like to restore a database snapshot using SMO API calls, rather than using Transact-SQL (restore database <dbname> from database_snapshot = '<SnapshotName>') to do so. I've been searching through the Microsoft.SqlServer.Smo assembly without a whole lot of luck though. It doesn't appear that there is a Database.Restore('snapshotname') method, or anything like it.
If this post was helpful, please click the little "Vote as Helpful" button :)Trevor Sullivan
Trevor Sullivan's Tech Room
Montag, 6. Februar 2012 04:55Moderator
Hi Trevor,TechNet Subscriber Support
It seems there is not a method in SMO which can be used to restore the database snapshot directly. Issue the Transact-SQL command is a simple way to do this. You may have a look at the Volume Shadow Copy Service API about this type of usage: Introduction to the Volume Shadow Copy Service API in C++.
If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
TechNet Community Support
Donnerstag, 17. Mai 2012 10:48
Hope this may help you, please check it out.
Donnerstag, 1. November 2012 22:39Moderator