Access Check Procedures

These functions check access permissions allowed to the user for protecting or unprotecting the data. Depending on the permitted access, a bit value 0 (zero) or 1 is returned.

xp_pty_select_check

This stored procedure determines whether the user has select (unprotect) access to the data element.

Signature:

xp_pty_select_check(dataelement VARCHAR)

Parameters:

NameTypeDescription
dataelementVARCHAR(64)Specifies the name of the data element.

Returns:
This UDF returns either of the following values:

ValueCondition
0If the user has select(unprotected) access
1If the user does not have access

Example:

DECLARE 
 @result BIT
SELECT @result = master.dbo.xp_pty_select_check ('AES256')
PRINT @result 

In the Example, value=‘AES256’, is the name of the data element.

xp_pty_update_check

This stored procedure determines whether the user has update access to the data element.

Signature:

xp_pty_update_check (dataelement VARCHAR)

Parameters:

NameTypeDescription
dataelementVARCHAR(64)Specifies the name of the data element.

Returns:
This UDF returns either of the following values:

ValueCondition
0If the user has update access
1If the user does not have access

Example:

DECLARE
 @result BIT
SELECT @result = master.dbo.xp_pty_update_check('AES256')
PRINT @result

In the Example, value=‘AES256’, is the name of the data element.

xp_pty_insert_check

This stored procedure determines whether the user has insert (protect) access to the data element.

Signature:

xp_pty_insert_check(dataelement VARCHAR)

Parameters:

NameTypeDescription
dataelementVARCHAR(64)Specifies the name of the data element.

Returns:
This UDF returns either of the following values:

ValueCondition
0If the user has insert(protected) access
1If the user does not have access

Example:

DECLARE
 @result BIT
SELECT @result = master.dbo.xp_pty_insert_check('AES256')
PRINT @result

In the Example, value=‘AES256’, is the name of the data element.


Last modified : May 21, 2026