Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

faaUser_ID

  • Last UpdatedMar 18, 2021
  • 2 minute read

Returns the database user ID (in the Runtime database) for the current user, if the user has an individual login. Returns the database ID of the appropriate Windows security group, if the current user is a group member and does have an individual login (that is, the current user logs in by virtue of being a member of the Windows group).

Syntax

SELECT dbo.faaUser_ID()

Return Type

Integer.

Remarks

This function is used for processing annotations and for support of private namespaces.

  • If a user has their own database login, the user has a completely private namespace and private annotations.

  • If the user is part of a Windows security group, and logs in only by virtue of being part of the group, the private namespace and annotations are shared with all members of that group.

This stored procedure assumes that Windows users that are logged in are only members of a single Windows group (configured in SQL Server). If a user is found in more than one group, the ID of the last group found is used. This could be a problem if you are expecting a given user to have access to a particular private group.

Also, it is possible that annotations and namespace entries are created under names that you might not expect. For example, a user is a local administrator on a computer, and the user’s login has also been added to the aaUsers local group. When logging in to SQL Server, the user will be mapped to the sysadmin fixed server role, by virtue of the user’s membership in the BUILTIN\Administrators group. (This assumes that the BUILTIN\Administrators login has not been modified or disabled for security reasons). If this user creates annotations or private namespace entries, these appear as if they had been created by "dbo," rather than by a member of the local aaUsers group.

In This Topic
TitleResults for “How to create a CRG?”Also Available in