[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Problem with SMO - Restore PercentCompleteNotification

Scott

3/18/2007 2:20:00 PM

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 trigged a total 23 times, it should have been 100 times.

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.
2 Answers

Dan Guzman

3/18/2007 2:50:00 PM

0

If the event handler is still busy processing the previous notification
event when the next one is raised, it will be skipped. This often occurs
for restores that run very quickly.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Scott" <Scott@discussions.microsoft.com> wrote in message
news:B0C55A00-EF19-4315-B95B-D0A79F94DFBC@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 trigged a total 23 times, it should have been 100
> times.
>
> 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.

Scott

3/18/2007 10:12:00 PM

0

All,

I was able to use the PercentCompleteEventArgs member "e.Percent" to
retrieve the actual value that was needed.

"Scott" wrote:

> 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 trigged a total 23 times, it should have been 100 times.
>
> 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.