PublicationAttributes Property

SQL-DMO

SQL-DMO

PublicationAttributes Property

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

Applies To
DistributionPublication Object TransPublication Object
MergePublication Object TransPullSubscription Object
Syntax

object.PublicationAttributes [= value]

Parts

object

Expression that evaluates to an object in the Applies To list

value

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 Allow anonymous Subscriber-originated subscriptions against the referenced publication.
SQLDMOPubAttrib_AllowPull 2 Allow known Subscriber-originated (pull) subscriptions against the referenced publication.
SQLDMOPubAttrib_AllowPush 1 Allow Publisher to force subscription to the publication.
SQLDMOPubAttrib_AllowSubscriptionCopy 100 Allow copying and attaching of subscription database to other Subscribers.
SQLDMOPubAttrib_CompressSnapshot 128 Compress snapshot files.
SQLDMOPubAttrib_Default 1 SQLDMOPubAttrib_AllowPush
SQLDMOPubAttrib_ImmediateSync 16 Force immediate synchronization of the referenced publication.
SQLDMOPubAttrib_IndependentAgent 32 Run agent as an independent agent.
SQLDMOPubAttrib_InternetEnabled 8 Enable the referenced publication for distribution across the Internet.
SQLDMOPubAttrib_SnapshotInDefaultFolder 64 Keep snapshot copy in default folder.
SQLDMOPubAttrib_Unknown 256 Referenced publication has a bad or unknown attribute setting.
SQLDMOPubAttrib_Valid 511 Mask for valid attribute settings.

Remarks

The PublicationAttributes 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, the SQLDMOPubAttrib_AllowPull, SQLDMOPubAttrib_AllowAnonymous and SQLDMOPubAttrib_ImmediateSync must all be specified.

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

Note  If an application sets PublicationAttributes with the MergePublication or 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 reapplied to each subscription. Snapshots are applied when the next scheduled snapshot and distribution or merge agent run.

See Also

AltSnapshotFolder Property