다음을 통해 공유


PublicationAttributes Property

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The PublicationAttributes property specifies available functions for a Microsoft SQL Server replication publication.

구문

object
.PublicationAttributes [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.

  • value
    A long integer that specifies publication behaviors described in Settings.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetPublicationAttributes(SQLDMO_PUBATTRIB_TYPE* pRetVal);
HRESULT SetPublicationAttributes(SQLDMO_PUBATTRIB_TYPE NewValue);

Settings

Set value using these SQLDMO_PUBATTRIB_TYPE values.

Constant

Value

Description

SQLDMOPubAttrib_AllowAnonymous

4

Allows anonymous Subscriber-originated subscriptions against the referenced publication.

SQLDMOPubAttrib_AllowPull

2

Allows known Subscriber-originated (pull) subscriptions against the referenced publication.

SQLDMOPubAttrib_AllowPush

1

Allows the Publisher to force subscription to the publication.

SQLDMOPubAttrib_/AllowSubscriptionCopy

100

Allows copying and attaching of the subscription database to other Subscribers.

SQLDMOPubAttrib_/CompressSnapshot

128

Compresses snapshot files.

SQLDMOPubAttrib_Default

1

SQLDMOPubAttrib_AllowPush.

SQLDMOPubAttrib_ImmediateSync

16

Forces immediate synchronization of the referenced publication.

SQLDMOPubAttrib_IndependentAgent

32

Runs the agent as an independent agent.

SQLDMOPubAttrib_InternetEnabled

8

Enables the referenced publication for distribution across the Internet.

SQLDMOPubAttrib_/SnapshotInDefaultFolder

64

Keeps the snapshot copy in the default folder.

SQLDMOPubAttrib_Unknown

256

The referenced publication has an unknown attribute setting.

SQLDMOPubAttrib_Valid

511

A mask for valid attribute settings.

주의

ThePublicationAttributes property is a bit-packed value that specifies one or more allowed functions. Combine values using the OR logical operator.

For a referenced, Subscriber-initiated subscription, PublicationAttributes is SQLDMOPubAttrib_Min until synchronization occurs and the Subscriber can determine the attributes.

To enable anonymous subscriptions, SQLDMOPubAttrib_AllowPull, SQLDMOPubAttrib_AllowAnonymous and SQLDMOPubAttrib_ImmediateSync must all be specified.

If the SQLDMOPubAttrib_InternetEnabled attribute is specified, the AltSnapshotFolder property must be specified. If the AltSnapshotFolder property is set to NULL or an empty string, SQLDMOPubAttrib_InternetEnabled is automatically turned off.

[!참고]

If an application sets PublicationAttributes with the MergePublicationor TransPublication object with a setting of SQLDMOPubAttrib_CompressSnapshot, SQLDMOPubAttrib_InternetEnabled, or SQLDMOPubAttrib_SnapshotInDefaultFolder after the initial snapshot has been created, a new snapshot must be generated and then reapplied to each subscription. Snapshots are applied when the next scheduled snapshot and distribution or merge agent run.

참고 항목

참조