SPONSORSHIPOPPORTUNITYLOCK

Holds locking information for sponsorship opportunities.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
SPONSORCOUNT smallint Default = ((0)) The number of active sponsors for this opportunity.
LOCKCOUNT smallint Default = ((0)) The number of processes currently accessing this opportunity for the purpose of creating a sponsorship (part of the locking model).
LOCKED bit Default = 0 True when no more processes should be allowed to access this opportunity.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier SPONSORSHIPOPPORTUNITY.ID Primary Key.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_SPONSORSHIPOPPORTUNITYLOCK_DATEADDED DATEADDED yes
IX_SPONSORSHIPOPPORTUNITYLOCK_DATECHANGED DATECHANGED
PK_SPONSORSHIPOPPORTUNITYLOCK ID yes yes

Triggers

Trigger Name Description
TR_SPONSORSHIPOPPORTUNITYLOCK_AUDIT_UPDATE
TR_SPONSORSHIPOPPORTUNITYLOCK_AUDIT_DELETE