יום שישי 03 פברואר 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
יום שני 06 פברואר 2012 04:55מנחה דיון
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
יום חמישי 17 מאי 2012 10:48
Hope this may help you, please check it out.
יום חמישי 01 נובמבר 2012 22:39מנחה דיון