All,

I am using SQL Server Manager Objects (SMO) Restore to restore an SQL
Database.

All works well however when I set the PercentCompleteNotification = 1
I would of expected the PercentCompleteEventHandler to trigger every one
percent, instead it triggers a total 23 times not 100.

Yet If I set PercentCompleteNotification = 10 the
PercentCompleteEventHandler will trigger ten times which is expected.

Does anyone know what the problem is?

Thanks in advance.

Re: Problem with Restore (SMO) PercentCompleteNotification by David

David
Sun Mar 18 09:12:14 CDT 2007



"Scott" <Scott@discussions.microsoft.com> wrote in message
news:0BE03A8B-2CDF-4657-969D-52AE18898E02@microsoft.com...
> All,
>
> I am using SQL Server Manager Objects (SMO) Restore to restore an SQL
> Database.
>
> All works well however when I set the PercentCompleteNotification = 1
> I would of expected the PercentCompleteEventHandler to trigger every one
> percent, instead it triggers a total 23 times not 100.
>
> Yet If I set PercentCompleteNotification = 10 the
> PercentCompleteEventHandler will trigger ten times which is expected.
>
> Does anyone know what the problem is?
>

The backup and restore percent complete messages aren't guaranteed to fire
exactly on the target percent. The PercentCompleteEventArgs has the percent
complete value, which should be accurate.

David


Re: Problem with Restore (SMO) PercentCompleteNotification by Scott

Scott
Sun Mar 18 17:05:02 CDT 2007

David,

Your answer was of great help.
I was able to connect this handler properly to a progress bar which now
reports the correct percentage.
Thanks.

Scott

> The backup and restore percent complete messages aren't guaranteed to fire
> exactly on the target percent. The PercentCompleteEventArgs has the percent
> complete value, which should be accurate.
>
> David
>
>