Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

public vs guest

2 posts in General Discussion Last posting was on 2012-12-06 12:49:04.0Z
karthik Posted on 2012-12-06 05:15:46.0Z
Sender: 156e.50c0274a.1804289383@sybase.com
From: Karthik
Newsgroups: sybase.public.ase.general
Subject: public vs guest
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50c02a02.15ce.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 5 Dec 2012 21:15:46 -0800
X-Trace: forums-1-dub 1354770946 172.20.134.41 (5 Dec 2012 21:15:46 -0800)
X-Original-Trace: 5 Dec 2012 21:15:46 -0800, 172.20.134.41
Lines: 7
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31583
Article PK: 1158159

Hi,

i would like to know what is the exact difference between

grant select on table1 to public

grant select on table1 to guest


Luc Van der Veurst Posted on 2012-12-06 12:49:04.0Z
From: "Luc Van der Veurst" <dba_azvub@hotmail.com>
Newsgroups: sybase.public.ase.general
References: <50c02a02.15ce.1681692777@sybase.com>
Subject: Re: public vs guest
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
X-Forwarded: by - (DeleGate/5.8.7)
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50c09440$1@forums-1-dub>
Date: 6 Dec 2012 04:49:04 -0800
X-Trace: forums-1-dub 1354798144 172.20.134.152 (6 Dec 2012 04:49:04 -0800)
X-Original-Trace: 6 Dec 2012 04:49:04 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31589
Article PK: 1158169


<Karthik> wrote in message news:50c02a02.15ce.1681692777@sybase.com...
> Hi,
>
> i would like to know what is the exact difference between
>
> grant select on table1 to public

public is a group.

Every user in the database (not the server, added with sp_adduser to the
database)
inherites the permissions of the public group.

> grant select on table1 to guest

guest is a user.

If a guest user is added to the database, any user in the server
(even those that are not defined in the database) gets the permissions of
the
guest user, and since that's a user in the database, also the permissions
granted to the
group public.


The disadvantage of groups is that a user can only belong to one group in a
database.

What works best for me is using serverwide roles in combination with a guest
user in
the database. Then there is no need to define users in the database and the
users get
their permissions through the roles they belong to.

Luc.