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.

COMMAND GRANT

2 posts in General Discussion Last posting was on 2006-01-24 20:08:18.0Z
Ivan Posted on 2006-01-24 19:18:48.0Z
From: "Ivan" <ibmoreno@bol.com.br>
Newsgroups: ianywhere.public.general
Subject: COMMAND GRANT
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
X-Original-NNTP-Posting-Host: 201.24.10.7
Message-ID: <43d67a78@forums-2-dub>
X-Original-Trace: 24 Jan 2006 11:05:28 -0800, 201.24.10.7
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 24 Jan 2006 11:05:29 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 24 Jan 2006 11:18:48 -0800
X-Trace: forums-1-dub 1138130328 10.22.108.75 (24 Jan 2006 11:18:48 -0800)
X-Original-Trace: 24 Jan 2006 11:18:48 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5141
Article PK: 1203

how do I do to give to allow SELECT for an user in all my tables?
do I have to do one to one?

GRANT SELECT ON ? to ivan

thank you


Breck Carter [TeamSybase] Posted on 2006-01-24 20:08:18.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: COMMAND GRANT
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <691dt1tk2j2a0gr4e4ibmcimkdfev1j38u@4ax.com>
References: <43d67a78@forums-2-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 24 Jan 2006 12:08:18 -0800
X-Trace: forums-1-dub 1138133298 64.7.134.118 (24 Jan 2006 12:08:18 -0800)
X-Original-Trace: 24 Jan 2006 12:08:18 -0800, bcarter.sentex.ca
Lines: 42
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5142
Article PK: 1205

You need at least one GRANT per table:

GRANT SELECT ON ttt TO ivan;

However, if you have a lot of *users*, you can put them in a group.
This is often done with the DBA user/group id, because that user is
also the owner and making it a group solves another problem (name
visibility without having to say FROM DBA.ttt):

GRANT GROUP TO DBA;
GRANT SELECT ON t1 TO DBA;
GRANT SELECT ON t2 TO DBA;
GRANT ...

Then just do one grant per user:

GRANT MEMBERSHIP IN GROUP DBA TO ivan;
GRANT MEMBERSHIP IN GROUP DBA TO ilya;
GRANT ...

Do not worry, the users will not inherit the "DBA" privilege from the
group called DBA; only the SELECT and other safe privileges will be
inherited.

Breck

On 24 Jan 2006 11:18:48 -0800, "Ivan" <ibmoreno@bol.com.br> wrote:

>how do I do to give to allow SELECT for an user in all my tables?
>do I have to do one to one?
>
>GRANT SELECT ON ? to ivan
>
>thank you
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com