TransferPercentComplete Event

后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The TransferPercentComplete event occurs after SQL Distributed Management Objects (SQL-DMO) completes schema or data copy for a Microsoft SQL Server component referenced by the Transfer object.

语法

Private Sub
object
_TransferPercentComplete(
Message as String
, 
Percent as Long
)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Message
    String that contains descriptive message text.
  • Percent
    Long integer representation of a percentage value. The value is the percent of processing complete scaled by 100. For example, a process seven percent complete reports the value 7.

Prototype (C/C++)

HRESULT TransferPercentComplete(SQLDMO_LPCSTR szMessage,
long Percent);

备注

When using the Transfer method of the Database object, SQL-DMO calculates percentage completion after a component is copied. Component copy can be implemented by simple, non-time-intensive tasks such as creation of schema, or can require time-intensive tasks such as the copy of a large amount of data.

The TransferPercentComplete event is raised once for every component referenced by the Transfer object. SQL-DMO attempts to weight the value provided in the Percent argument of the event handler to reflect the time needed to re-create a component on the target database.

Applies To:

Transfer Object