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.

omit owner of the table

2 posts in General Discussion Last posting was on 2009-03-04 14:36:07.0Z
Alex Posted on 2009-03-04 12:40:16.0Z
Sender: 191f.49ad287c.1804289383@sybase.com
From: Alex
Newsgroups: ianywhere.public.general
Subject: omit owner of the table
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49ae76b0.3955.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Mar 2009 04:40:16 -0800
X-Trace: forums-1-dub 1236170416 10.22.241.41 (4 Mar 2009 04:40:16 -0800)
X-Original-Trace: 4 Mar 2009 04:40:16 -0800, 10.22.241.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7393
Article PK: 5808

if table has been created by one user and other user want to
access it he should define owner in query, smth like
select * from DBA.table

is any way to omit owner prefix for non-owner?


Breck Carter [TeamSybase] Posted on 2009-03-04 14:36:07.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: omit owner of the table
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <ld4tq4t71n84g2a68q3qo0bd8klopi3kmo@4ax.com>
References: <49ae76b0.3955.1681692777@sybase.com>
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: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Mar 2009 06:36:07 -0800
X-Trace: forums-1-dub 1236177367 10.22.241.152 (4 Mar 2009 06:36:07 -0800)
X-Original-Trace: 4 Mar 2009 06:36:07 -0800, vip152.sybase.com
Lines: 58
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7394
Article PK: 5810

---------------------------------------------------------------------
GRANT GROUP TO DBA;
GRANT MEMBERSHIP IN GROUP DBA TO uuu; -- stops "not found" errors
GRANT SELECT ON ttt TO DBA; -- stops "permission denied" errors
-- The full "DBA authority" is NOT inherited by uuu

---------------------------------------------------------------------
-- Testing...

--------------------
-- Connect as DBA...

CREATE TABLE ttt ( pkey INTEGER NOT NULL PRIMARY KEY );

GRANT CONNECT TO uuu IDENTIFIED BY sql;

--------------------
-- Connect as uuu...

SELECT * FROM ttt; -- Table 'ttt' not found

--------------------
-- Connect as DBA...

GRANT GROUP TO DBA;
GRANT MEMBERSHIP IN GROUP DBA TO uuu; -- stops "not found" errors

--------------------
-- Connect as uuu...

SELECT * FROM ttt; -- Permission denied...

--------------------
-- Connect as DBA...

GRANT SELECT ON ttt TO DBA; -- stops "permission denied" errors

--------------------
-- Connect as uuu...

SELECT * FROM ttt; -- works

DROP TABLE ttt; -- Permission denied...

On 4 Mar 2009 04:40:16 -0800, Alex wrote:

>
>if table has been created by one user and other user want to
>access it he should define owner in query, smth like
>select * from DBA.table
>
>is any way to omit owner prefix for non-owner?

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com