Functions

Adaptive Server 15.7 contains new and changed functions.

New functions
Function Description
dol_downgrade_check

Returns the number of data-only-locked (DOL) tables in the specified database that contain variable-length columns wider then 8191 bytes

create_locator

Explicitly creates a locator for a specified large object (LOB)

locator_literal

Identifies a binary value as a locator literal

locator_valid

Determines whether a LOB locator is valid

lprofile_id Returns the login profile ID for the specified login profile name, or the login profile ID for the login profile associated with the current login or specified login name
lprofile_name Returns the login profile name for the specified login profile ID, or the login profile name for the login profile associated with the current login or specified login suid
return_lob

Dereferences a locator, and returns the LOB referenced by that locator

setdata

Overwrites some or all of a LOB

show_cached_plan_in_xml

Displays, in XML, the executing query plan for queries in the statement cache

show_dynamic_params_in_xml

Returns the text of a query in XML format

Changed functions
Function Description
charindex

charindex adds support for the text_locator, unitext_locator, and image_locator LOB locator datatypes and the start option.

charlength

charlength supports the text_locator and unitext_locator datatypes.

datalength

datalength accepts the text_locator, unitext_locator, and image_locator datatypes.

patindex

patindex accepts the text_locator and unitext_locator datatypes.

show_cached_plan_in_xml

show_cached_plan_in_xml expands the scope of the statement_id parameter to accept object IDs that refer to any lightweight procedure, not only those in the statement cache.

str

The decimal parameter of the str function has been expanded to support padding of the output with a character or numeric to the specified length.

textptr

Because the in-row/off-row LOB feature can split or shrink the data page of an allpages-locked table with a clustered index, causing data rows—incuding in-row LOB columns that reside in those data rows—to move to different pages, the textptr text pointer value of such in-row LOB columns before the split or shrink operation differs from that of the same column after such an operation.

For Adaptive Server 15.7 and later, the textptr value returned for an in-row LOB column residing in a data-only-locking data row that is row-forwarded remains unchanged and remains valid after the forwarding.

textvalid

You can use textvalid on the returned text pointer for both in-row and off-row LOBs, returning 1 if the text pointer points to a valid LOB column, and 0 if the LOB column is invalid.

See the Reference Manual: Building Blocks.