Can someone please help me to get list of all users, created date and assigned roles to users in Sybase database? I tried all ways but no luck.
Thank you.
I tried to find in syslogins and sp_display but I am unable to find user created date.
Can someone please help me to get list of all users, created date and assigned roles to users in Sybase database? I tried all ways but no luck.
Thank you.
I tried to find in syslogins and sp_display but I am unable to find user created date.
Copyright © 2021 Jogjafile Inc.
First of all do you have the appropriate privs ?
To query the
syslogins table in the master database,you need to have thesso_roleorsa_rolesystem role. To query thesysusersandsysrolestables in each individual database, you need to have thesa_rolesystem role or be the owner of the database.displays information about your login account, including the roles that are granted to you. If you have the sso_role or sa_role system roles, they will be listed
sysloginstable is located in themasterdatabase, while thesysusersandsysrolestables are located in each individual database. You can join thesysloginstable with thesysusersandsysrolestables to get a list of all users, their creation date, and assigned roles.Above is for users in the current database. If you want to retrieve this information for users in a different database, you need to run the query in that database.
In
ASE Sybase( Unlike Oracle or Teradata ) it is not possible to write a single query that retrieves a list of all users, their creation date, and assignedrolesacross all databases. Thesysusersandsysrolestables are located in each individual database and contain information about users and roles specific to that database. To get a list of all users, their creation date, and assigned roles across all databases, you would need to run separate queries in each database and combine the results programmatically using aStored Proc