2.2.7.3 AllUserData Table
The AllUserData Table stores data for all list and document library list items. The table provides a fixed number of generic columns in various data types, affording storage for application-defined variable schemas. A list item can be represented by more than one row in this table, if its list's schema requires more entries of a particular data type than are available in a single row. Application-defined metadata for documents in document libraries also resides in AllUserData, and it is accessed via joins with the Docs View (section 2.2.7.4).
The table is defined using T-SQL syntax, as follows.
-
TABLE AllUserData ( tp_Id int NOT NULL, tp_ListId uniqueidentifier NOT NULL, tp_SiteId uniqueidentifier NOT NULL, tp_RowOrdinal int NOT NULL DEFAULT ((0)), tp_Version int NOT NULL, tp_Author int NULL, tp_Editor int NULL, tp_Modified datetime NULL, tp_Created datetime NULL, tp_Ordering varchar(512) NULL, tp_ThreadIndex varbinary(512) NULL, tp_HasAttachment bit NOT NULL DEFAULT ((0)), tp_ModerationStatus int NOT NULL DEFAULT ((0)), tp_IsCurrent bit NOT NULL DEFAULT ((1)), tp_ItemOrder float NULL, tp_InstanceID int NULL, tp_GUID uniqueidentifier NOT NULL DEFAULT (newid()), tp_CopySource nvarchar(260) NULL DEFAULT (NULL), tp_HasCopyDestinations bit NULL DEFAULT ((0)), tp_AuditFlags int NULL, tp_InheritAuditFlags int NULL, tp_Size int NOT NULL DEFAULT ((0)), tp_WorkflowVersion int NULL, tp_WorkflowInstanceID uniqueidentifier NULL, tp_DirName nvarchar(256) NOT NULL, tp_LeafName nvarchar(128) NOT NULL, tp_DeleteTransactionId varbinary(16) NOT NULL DEFAULT (0x), tp_ContentType nvarchar(255) NULL, tp_ContentTypeId varbinary(512) NULL, nvarchar1 nvarchar(255) NULL, nvarchar2 nvarchar(255) NULL, nvarchar3 nvarchar(255) NULL, nvarchar4 nvarchar(255) NULL, nvarchar5 nvarchar(255) NULL, nvarchar6 nvarchar(255) NULL, nvarchar7 nvarchar(255) NULL, nvarchar8 nvarchar(255) NULL, ntext1 ntext NULL, ntext2 ntext NULL, ntext3 ntext NULL, ntext4 ntext NULL, sql_variant1 sql_variant NULL, nvarchar9 nvarchar(255) NULL, nvarchar10 nvarchar(255) NULL, nvarchar11 nvarchar(255) NULL, nvarchar12 nvarchar(255) NULL, nvarchar13 nvarchar(255) NULL, nvarchar14 nvarchar(255) NULL, nvarchar15 nvarchar(255) NULL, nvarchar16 nvarchar(255) NULL, ntext5 ntext NULL, ntext6 ntext NULL, ntext7 ntext NULL, ntext8 ntext NULL, sql_variant2 sql_variant NULL, nvarchar17 nvarchar(255) NULL, nvarchar18 nvarchar(255) NULL, nvarchar19 nvarchar(255) NULL, nvarchar20 nvarchar(255) NULL, nvarchar21 nvarchar(255) NULL, nvarchar22 nvarchar(255) NULL, nvarchar23 nvarchar(255) NULL, nvarchar24 nvarchar(255) NULL, ntext9 ntext NULL, ntext10 ntext NULL, ntext11 ntext NULL, ntext12 ntext NULL, sql_variant3 sql_variant NULL, nvarchar25 nvarchar(255) NULL, nvarchar26 nvarchar(255) NULL, nvarchar27 nvarchar(255) NULL, nvarchar28 nvarchar(255) NULL, nvarchar29 nvarchar(255) NULL, nvarchar30 nvarchar(255) NULL, nvarchar31 nvarchar(255) NULL, nvarchar32 nvarchar(255) NULL, ntext13 ntext NULL, ntext14 ntext NULL, ntext15 ntext NULL, ntext16 ntext NULL, sql_variant4 sql_variant NULL, nvarchar33 nvarchar(255) NULL, nvarchar34 nvarchar(255) NULL, nvarchar35 nvarchar(255) NULL, nvarchar36 nvarchar(255) NULL, nvarchar37 nvarchar(255) NULL, nvarchar38 nvarchar(255) NULL, nvarchar39 nvarchar(255) NULL, nvarchar40 nvarchar(255) NULL, ntext17 ntext NULL, ntext18 ntext NULL, ntext19 ntext NULL, ntext20 ntext NULL, sql_variant5 sql_variant NULL, nvarchar41 nvarchar(255) NULL, nvarchar42 nvarchar(255) NULL, nvarchar43 nvarchar(255) NULL, nvarchar44 nvarchar(255) NULL, nvarchar45 nvarchar(255) NULL, nvarchar46 nvarchar(255) NULL, nvarchar47 nvarchar(255) NULL, nvarchar48 nvarchar(255) NULL, ntext21 ntext NULL, ntext22 ntext NULL, ntext23 ntext NULL, ntext24 ntext NULL, sql_variant6 sql_variant NULL, nvarchar49 nvarchar(255) NULL, nvarchar50 nvarchar(255) NULL, nvarchar51 nvarchar(255) NULL, nvarchar52 nvarchar(255) NULL, nvarchar53 nvarchar(255) NULL, nvarchar54 nvarchar(255) NULL, nvarchar55 nvarchar(255) NULL, nvarchar56 nvarchar(255) NULL, ntext25 ntext NULL, ntext26 ntext NULL, ntext27 ntext NULL, ntext28 ntext NULL, sql_variant7 sql_variant NULL, nvarchar57 nvarchar(255) NULL, nvarchar58 nvarchar(255) NULL, nvarchar59 nvarchar(255) NULL, nvarchar60 nvarchar(255) NULL, nvarchar61 nvarchar(255) NULL, nvarchar62 nvarchar(255) NULL, nvarchar63 nvarchar(255) NULL, nvarchar64 nvarchar(255) NULL, ntext29 ntext NULL, ntext30 ntext NULL, ntext31 ntext NULL, ntext32 ntext NULL, sql_variant8 sql_variant NULL, int1 int NULL, int2 int NULL, int3 int NULL, int4 int NULL, int5 int NULL, int6 int NULL, int7 int NULL, int8 int NULL, int9 int NULL, int10 int NULL, int11 int NULL, int12 int NULL, int13 int NULL, int14 int NULL, int15 int NULL, int16 int NULL, float1 float NULL, float2 float NULL, float3 float NULL, float4 float NULL, float5 float NULL, float6 float NULL, float7 float NULL, float8 float NULL, float9 float NULL, float10 float NULL, float11 float NULL, float12 float NULL, datetime1 datetime NULL, datetime2 datetime NULL, datetime3 datetime NULL, datetime4 datetime NULL, datetime5 datetime NULL, datetime6 datetime NULL, datetime7 datetime NULL, datetime8 datetime NULL, bit1 bit NULL, bit2 bit NULL, bit3 bit NULL, bit4 bit NULL, bit5 bit NULL, bit6 bit NULL, bit7 bit NULL, bit8 bit NULL, bit9 bit NULL, bit10 bit NULL, bit11 bit NULL, bit12 bit NULL, bit13 bit NULL, bit14 bit NULL, bit15 bit NULL, bit16 bit NULL, uniqueidentifier1 uniqueidentifier NULL, tp_Level tinyint NOT NULL DEFAULT ((1)), tp_IsCurrentVersion bit NOT NULL DEFAULT (CONVERT ([bit],(1),0)), tp_UIVersion int NOT NULL CONSTRAINT [AllUserData_DEFAULT_UIVersionDEFAULT((512)), tp_CalculatedVersion int NOT NULL CONSTRAINT [AllUserData_DEFAULT_CalculatedVersionDEFAULT((0)), tp_UIVersionString AS ((CONVERT([nvarchar],[tp_UIVersion]/(512),0)+'.') + CONVERT([nvarchar],[tp_UIVersion]%(512),0)), tp_DraftOwnerId int NULL DEFAULT (NULL), tp_CheckoutUserId int NULL DEFAULT (NULL) );
tp_Id: The identifier for the list item, uniquely identifying it within the AllUserData table.
tp_ListId: The List Identifier (section 2.2.1.5) of the list or document library containing the list item.
tp_SiteId: The Site Collection Identifier (section 2.2.1.9) of the site collection containing the list item.
tp_RowOrdinal: The zero-based ordinal index of this row in the set of rows representing the list item. Additional rows are used to represent list items that have more application-defined columns of one or more data types than can fit in a single row in the AllUserData table.
tp_Version: A counter incremented any time a change is made to the list item, used for internal conflict detection. Due to the mapping of application properties to the generic columns schema in this table, changes to application schema as well as property values can affect a version increment.
tp_Author: The User Identifier (section 2.2.1.13) for the user who created the list item.
tp_Editor: The User Identifier for the user who last edited the list item.
tp_Modified: A date and time value in UTC format specifying when this list item was last modified.
tp_Created: A date and time value in UTC format specifying when this list item was created.
tp_Ordering: A concatenation of time stamp values in yyyyMMddHHmmss format, specifying the threading structure of the list items in a legacy discussion board list (a list with a List Base Type (section 2.2.3.11) of 3). For list items in all other types of list, this parameter MUST be NULL.
tp_ThreadIndex: A binary structure specifying the list item's position within a legacy discussion board list (a list with a List Base Type of 3). For list items in all other types of list, this parameter MUST be NULL.
tp_HasAttachment: A bit set to 1 if the list item has an attachment associated with it; otherwise, it is set to 0.
tp_ModerationStatus: A Moderation Status (section 2.2.3.13) value indicating the current moderation approval status of the list item.
tp_IsCurrent: A bit set to 1 if this is a current version of this list item; otherwise, it is set to 0.
tp_ItemOrder: A value used to calculate the relative order in which to view the list item when displayed with other list items from the same list.
tp_InstanceID: If this list item is associated with a particular instance of a recurring meeting, this is the integer ID of that instance. For all other list items, this MUST be NULL.
tp_GUID: A List Item Identifier (section 2.2.1.6) value uniquely identifying this list item.
tp_CopySource: The URL used as a source for the list item. If this list item was not copied from a source list item, this value MUST be NULL.
tp_HasCopyDestinations: This bit is set to 1 if destination locations for the list item to be copied to have been set. If the list item does not have a destination location set, this value MUST be 0.
tp_AuditFlags: An Audit Flags (section 2.2.2.1) value determining the operations to be tracked on this list item.
tp_InheritAuditFlags: An Audit Flags value for the operations to be tracked on this list item, as determined from parent container Audit Flags settings.
tp_Size: The sum of the size, in bytes, of the content of application-schema columns in the list item. This does not include the size of the stream for list items that have an associated stream.
tp_WorkflowVersion: If the list item is part of a workflow, this stores an integer denoting the state of this list item within that workflow. Otherwise, this value MUST be NULL.
tp_WorkflowInstanceID: A Workflow Identifier (section 2.2.1.16) value for the currently active workflow instance on this list item. If the list item is not part of a workflow, this value MUST be NULL.
tp_DirName: The directory name of the list item.
tp_LeafName: The leaf name of the list item.
tp_DeleteTransactionId: An identifier for use with the implementation-specific deleted items recycle bin. This MUST equal 0x if the list item is nondeleted.
tp_ContentType: The user-friendly name of the content type associated with the list item.
tp_ContentTypeId: The binary identifier of the content type associated with the list item.
The next seven columns are duplicated a number of times within the table definition. This is indicated using a suffix '#', which is replaced with a numeral in the column names, described as follows. The number of times each column is duplicated varies and is indicated for each column. Each group of columns is dedicated to hold application-defined fields of a different data type, described as follows.
nvarchar#: Columns for application-defined fields that hold values of type nvarchar. The 64 columns are named nvarchar1 to nvarchar64. If the column does not contain data, this value MUST be NULL.
ntext#: Columns for application-defined fields that hold values of type ntext. The 32 columns are named ntext1 to ntext32. If the column does not contain data, this value MUST be NULL.
sql_variant#: Columns for application-defined fields that hold values of type sql_variant. The 8 columns are named sql_variant1 to sql_variant8. If the column does not contain data, this value MUST be NULL.
int#: Columns for application-defined fields that hold values of type int. The 16 columns are named int1 to int16. If the column does not contain data, this value MUST be NULL.
float#: Columns for application-defined fields that hold values of type float. The 12 columns are named float1 to float12. If the column does not contain data, this value MUST be NULL.
datetime#: Columns for application-defined fields that hold values of type datetime. The 8 columns are named datetime1 to datetime8. If the column does not contain data, this value MUST be NULL.
bit#: Columns for application-defined fields that hold values of type bit. The 16 columns are named bit1 to bit16. If the column does not contain data, this value MUST be NULL.
uniqueidentifier1: A column for an application-defined field (2) of type uniqueidentifier. If the column does not contain data, this value MUST be NULL.
tp_Level: A publishing level value specifying the publishing status of this version of the list item.
tp_IsCurrentVersion: A bit indicating whether this row corresponds to a current version or an historical version of the list item. This value MUST be 1 if this row contains a current version. Otherwise, it MUST be 0.
tp_UIVersion: The UI version number associated with this list item. The default value of tp_UIVersion is 512, which corresponds to a displayed version of 1.0.
tp_CalculatedVersion: This contains the UI version number if this is an historical version of the list item. This MUST be 0 if the list item is a current version.
tp_UIVersionString: A calculated column containing the value of the tp_UIVersion column as a displayed version string.
tp_DraftOwnerId: The identifier of the user who created this list item as a draft. This value is non-NULL only if the list item exists and is a draft version.
tp_CheckoutUserId: The identifier of the user who checked out this list item. This value is non-NULL only if the list item exists and is checked out.