Unanswered: [ASE12.5] Information about roles in systemtables
Today I discovered something odd I never noticed before. The following situation:
A server with the usual user-logins, several non-system-roles, those roles being assigned to logins. Nothing strange so far.
The master..sysloginroles contains the records that join the master..syslogins-table with the master..syslogins-table, I get that. Yet, I have a userdefined role that has the sso-role assigned to it. When looking in the master..sysloginroles, I found no trace of that combination, nor in any other system table in the masterdatabase.
When looking at the poster of the ASE-systemtables, I noticed the sysroles and sysusers-table in the userdatabases. The sysroles-table seems to join the syssrvroles-table with the sysusers-table, i.e. assigning a role to a user in a database. I would have expected that kind of join to go from sysusers through syslogins, through sysloginroles to syssrvroles.
When looking at the content of the sysroles and the sysusers-tables I discovered something. The sysusers-table contains a record for a userdefined role, join to the master..syssrvroles-table through the sysroles-table. That record in sysusers has no corresponding value in the suid-column that points to a login in the master..syslogins-table. All it says is value -2. All records in sysusers that contain proper users point to the proper record in master..syslogins.
Now, I could be convinced that this is how ASE works, but why is it that only a few userdatabase have those records in sysusers, and not all databases?
Long story, I know, but I hope that someone understands it and can comment on it.
I'm not crazy, I'm an aeroplane!