Links

MSCEWI4064

XP_LOGININFO mapped to custom UDF

Severity

Low

Description

This EWI is added when the XP_LOGININFO procedure is executed and returns the following set of columns (See SQL SERVER documentation for more info)
account name
type
privilege
mapped login name
permission path
To simulate this behavior, we select the columns from the APPLICABLE_ROLES view in SnowFlake, which returns the following set of columns (See SnowFlake documentation for more info)
GRANTEE
ROLE_NAME
ROLE_OWNER
IS_GRANTABLE
SQL Server original columns are mapped as shown in the next table. They may be not completely equivalent.
SQL Server
SnowFlake
account name
GRANTEE
type
ROLE_OWNER
privilege
ROLE_NAME
mapped login name
GRANTEE
permission path
NULL

Code Example

Input Code:

EXEC xp_logininfo
EXEC xp_logininfo 'USERNAME'

Output Code:

/*** MSC-WARNING - MSCEWI4064 - XP_LOGININFO MAPPED TO CUSTOM UDF XPLOGININFO_UDF AND MIGHT HAVE DIFFERENT BEHAVIOR ***/
SELECT
*
FROM
TABLE(XPLOGININFO_UDF());
/*** MSC-WARNING - MSCEWI4064 - XP_LOGININFO MAPPED TO CUSTOM UDF XPLOGININFO_UDF AND MIGHT HAVE DIFFERENT BEHAVIOR ***/
SELECT
*
FROM
TABLE(XPLOGININFO_UDF('USERNAME'));

Recommendations

  • No additional user actions are required.
  • For more support, you can email us at [email protected] or post a message to our forums. If you have a contract for support with Mobilize.Net, reach out to your sales engineer and they can direct your support needs.