dbTalk Databases Forums  

sysroles table

comp.databases.sybase comp.databases.sybase


Discuss sysroles table in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
suraj kumar
 
Posts: n/a

Default sysroles table - 04-28-2004 , 10:57 AM






Dear Friends

When iam creating any role, the entry is going in syssrvroles system
table , when iam assigning the role to any login ,the entry is going
in sysloginroles table . Above both tables (syssrvroles,sysloginroles)
are only available in master database.
My Question is for what purpose we are using SYSROLES table which is
found in each database. In other words when the entries are going into
sysroles table

I will be very thankful if somebody is able to explain with Eg.

Regards
Surya

Reply With Quote
  #2  
Old   
Carl Kayser
 
Posts: n/a

Default Re: sysroles table - 04-28-2004 , 11:31 AM






I believe that an entry is made into sysroles and sysusers (for the role)
whenever the first grant is given to the role within the database. Note
that there may not be a USER row in sysusers that has the role (in master).

Role membership is server-wide so sysloginroles & syssrvroles are needed.

Permissions are local and can be for users, groups, and/or roles so
sysprotects and sysusers are needed. Is sysroles needed? It's not clear to
me. Right now it doesn't appear to be necessary. Perhaps the type & status
fields in sysroles will be used in the future?

"suraj kumar" <suraj_c (AT) hotmail (DOT) com> wrote

Quote:
Dear Friends

When iam creating any role, the entry is going in syssrvroles system
table , when iam assigning the role to any login ,the entry is going
in sysloginroles table . Above both tables (syssrvroles,sysloginroles)
are only available in master database.
My Question is for what purpose we are using SYSROLES table which is
found in each database. In other words when the entries are going into
sysroles table

I will be very thankful if somebody is able to explain with Eg.

Regards
Surya



Reply With Quote
  #3  
Old   
Martin Hanna
 
Posts: n/a

Default Re: sysroles table - 04-29-2004 , 06:15 PM



"suraj kumar" <suraj_c (AT) hotmail (DOT) com> wrote

Quote:
When iam creating any role, the entry is going in syssrvroles system
table , when iam assigning the role to any login ,the entry is going
in sysloginroles table . Above both tables (syssrvroles,sysloginroles)
are only available in master database.
My Question is for what purpose we are using SYSROLES table which is
found in each database. In other words when the entries are going into
sysroles table
From my own notes:

Step 1 - Create the Role (an entry is made in master..syssrvroles)

create role special_role

Step 2 - Grant Permission to User-Defined Roles (an entry is made in
sysprotects and shown in sp_helprotect)

grant select on mytable to special_role

Step 3 - Assign User-defined roles to logins (an entry is made in
master..sysloginroles)

grant role special_role to hannam



When a database permission is granted to a role, if an entry for the role
does not exist in master..syssrvroles, Adaptive Server adds an entry to the
database's sysroles.



HTH,

Martin




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.