IdentityRangeThreshold Property

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The IdentityRangeThreshold property specifies when to assign a new range of values to an identity column at a Publisher or Subscriber.

語法

object
.IdentityRangeThreshold [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    A long integer value from 1 through 100 that specifies (as a percentage of a Publisher's or Subscriber's range size) when a new identity range is allocated.

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetIdentityRangeThreshold(LPLONG pRetVal);
HRESULT SetIdentityRangeThreshold(LONG NewValue);

備註

The identity range size specifies the maximum number of new rows that can be inserted into an identity column in a table at a Publisher or Subscriber before the starting point of the identity range must be reallocated. Use IdentityRangeThreshold to control when an identity range is reallocated.

The identity range threshold is defined as a percentage of the range size specified by the PublisherIdentityRangeSize or SubscriberIdentityRangeSize properties. For example, if the identity range size is 50,000, set IdentityRangeThreshold to 80 to reallocate an identity range when the current identity values used reaches 40,000 rows.

Prior to setting IdentityRangeThreshold, set AutoIdentityRange to TRUE, and specify identity range sizes using the PublisherIdentityRangeSize and SubscriberIdentityRangeSize properties.

ms140380.note(zh-tw,SQL.90).gif附註:
If an application calls IdentityRangeThreshold on an instance of Microsoft SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.

Applies To:

MergeArticle2 Object

TransArticle2 Object

請參閱

參考

AutoIdentityRange Property
PublisherIdentityRangeSize Property
SubscriberIdentityRangeSize Property

說明及資訊

取得 SQL Server 2005 協助