About DBC.AccountInfoV
The DBC.AccountInfoV view accesses the DBC.Dbase, DBC.Profiles, and DBC.Accounts dictionary tables to return information about all valid accounts for all databases, users, and profiles.
Use DBC.AccountInfoV to find out:
This dictionary table … |
Stores … |
DBC.Accounts |
all accounts for all databases, users, and profiles. If an account is not specified at creation time, the default is used. The default is determined as explained in “Determining the Account for a User Session” on page 108. DBC.Accounts is used to verify any account entered by a user at logon time or with a SET SESSION ACCOUNT statement. |
DBC.DBase |
the default account for each: If a database or user is defined with multiple accounts, the first is used as the default. If a user is assigned a profile that is defined with one or more accounts, the first profile account is used as the default. (Profile accounts take precedence over user accounts.) |
DBC.Profiles |
the default account for each profile. If multiple accounts are defined, the first is used. Note: If an account is not specified for a profile, the value is NULL in the DefaultAccounts field for that profile. |
Example
The following query selects all account strings with a RUSH priority code, and whether the name associated with an account is an individual user or a profile:
SELECT AccountName,UserName,UserOrProfile
FROM DBC.AccountInfoV
WHERE AccountName LIKE '$R%'
ORDER BY AccountName ;
In this example, the view returns:
AccountName
$R1$ABCD&S&D&H
$R1$EFGH&S&D&H
$R2$IJKL&S&D&H
$R2$MNOP&S&D&H
$R2&QRST&S&D&H
|
UserName
AcctsRecv
DBADMIN
|
UserOrProfile
Profile
|