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.

User permission problem

3 posts in General Discussion Last posting was on 2004-02-23 13:11:15.0Z
Chandresh Patel Posted on 2004-02-23 03:20:24.0Z
From: "Chandresh Patel" <bapashree@yahoo.com>
Newsgroups: ianywhere.public.general
Subject: User permission problem
Lines: 16
Organization: Shreeji Smart Solution
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: ac8d0386.ipt.aol.com
X-Original-NNTP-Posting-Host: ac8d0386.ipt.aol.com
Message-ID: <40397178@forums-1-dub>
Date: 22 Feb 2004 19:20:24 -0800
X-Trace: forums-1-dub 1077506424 172.141.3.134 (22 Feb 2004 19:20:24 -0800)
X-Original-Trace: 22 Feb 2004 19:20:24 -0800, ac8d0386.ipt.aol.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2582
Article PK: 5720

Hi,

I am using (Syabse Anywhere 9.0.0 (1108) )

I logged in Sybase Central using dba userid and then create one user called
'test' and password is 'temp' and give then permission to S,I,U,D and then
logout from dba.

Login with test userid in Interactive SQL and type 'Select * from dActivity'
and it says dActivity table or view not found.

Do I need some more permission to do this.

Thanks in Advance.


Breck Carter [TeamSybase] Posted on 2004-02-23 11:25:00.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: User permission problem
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <n5oj309raou07qgj562jeu0irku0mcj2or@4ax.com>
References: <40397178@forums-1-dub>
X-Newsreader: Forte Agent 1.8/32.548
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: 23 Feb 2004 03:25:00 -0800
X-Trace: forums-1-dub 1077535500 64.7.134.118 (23 Feb 2004 03:25:00 -0800)
X-Original-Trace: 23 Feb 2004 03:25:00 -0800, bcarter.sentex.ca
Lines: 71
X-Authenticated-User: TeamPS
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2583
Article PK: 5721

On 22 Feb 2004 19:20:24 -0800, "Chandresh Patel" <bapashree@yahoo.com>

wrote:
>Login with test userid in Interactive SQL and type 'Select * from dActivity'
>and it says dActivity table or view not found.

It is not a permission problem, it is a name visibility problem.

You can probably do this now:

SELECT * FROM DBA.dActivity;

If you want to avoid the "DBA.", then here is an excerpt from Chapter
9, Protecting, in SQL Anywhere Studio 9 Developer's Guide ISBN
1-55622-506-7 Wordware Publishing to be published soon:

=====
Another advantage to user groups is that they can eliminate the need
to explicitly specify owner names when referring to tables and views.
For example, even though the GRANT statements shown above give user id
A permission to SELECT from the table DBA.t1, if it tries to execute
the following statement it will get an error "Table 't1' not found":

SELECT * FROM t1;

However, if the user id DBA executes the following GRANT statements,
it is no longer necessary for user id A to qualify the table name "t1"
with the owner name "DBA":

GRANT GROUP TO DBA;
GRANT MEMBERSHIP IN GROUP DBA TO A;

Now it's OK for the user id A to execute the following SELECT:

SELECT * FROM t1;

When a SQL statement is executed, SQL Anywhere must determine the
fully-qualified name for each reference to a table or view that omits
the owner name; here are the steps that accomplish that task:

1. If there is a local temporary table with a matching name, then the
search is over: the temporary table is the one to use.

2. If there is a global temporary or permanent table or view with a
matching name that is owned by the current user id, then the search is
over: that's the table or view to use.

3. If there is exactly one table or view with a matching name that is
owned by some group that the current user id is a member of, then the
search is over; that table or view is the one to use. This search
isn't affected by any hierarchical relationships that might exist
among the groups that the current user id is a member of; all the
groups are treated equally by the search.

4. If more one table or view with a matching name is found in Step 3,
each owned by a different group that the current user id is a member
of, it's an error: "Table 'x' is ambiguous".

5. If no table or view with a matching name is found, it's an error:
"Table 'x' not found".
=====

Breck



--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Chandresh Patel Posted on 2004-02-23 13:11:15.0Z
From: "Chandresh Patel" <bapashree@yahoo.com>
Newsgroups: ianywhere.public.general
References: <40397178@forums-1-dub> <n5oj309raou07qgj562jeu0irku0mcj2or@4ax.com>
Subject: Re: User permission problem
Lines: 82
Organization: Shreeji Smart Solution
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: ac9b18bd.ipt.aol.com
X-Original-NNTP-Posting-Host: ac9b18bd.ipt.aol.com
Message-ID: <4039fbf3@forums-1-dub>
Date: 23 Feb 2004 05:11:15 -0800
X-Trace: forums-1-dub 1077541875 172.155.24.189 (23 Feb 2004 05:11:15 -0800)
X-Original-Trace: 23 Feb 2004 05:11:15 -0800, ac9b18bd.ipt.aol.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2585
Article PK: 5722

Breck,

Thank you. It works.

"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
message news:n5oj309raou07qgj562jeu0irku0mcj2or@4ax.com...
> On 22 Feb 2004 19:20:24 -0800, "Chandresh Patel" <bapashree@yahoo.com>
> wrote:
> >Login with test userid in Interactive SQL and type 'Select * from
dActivity'
> >and it says dActivity table or view not found.
>
> It is not a permission problem, it is a name visibility problem.
>
> You can probably do this now:
>
> SELECT * FROM DBA.dActivity;
>
> If you want to avoid the "DBA.", then here is an excerpt from Chapter
> 9, Protecting, in SQL Anywhere Studio 9 Developer's Guide ISBN
> 1-55622-506-7 Wordware Publishing to be published soon:
>
> =====
> Another advantage to user groups is that they can eliminate the need
> to explicitly specify owner names when referring to tables and views.
> For example, even though the GRANT statements shown above give user id
> A permission to SELECT from the table DBA.t1, if it tries to execute
> the following statement it will get an error "Table 't1' not found":
>
> SELECT * FROM t1;
>
> However, if the user id DBA executes the following GRANT statements,
> it is no longer necessary for user id A to qualify the table name "t1"
> with the owner name "DBA":
>
> GRANT GROUP TO DBA;
> GRANT MEMBERSHIP IN GROUP DBA TO A;
>
> Now it's OK for the user id A to execute the following SELECT:
>
> SELECT * FROM t1;
>
> When a SQL statement is executed, SQL Anywhere must determine the
> fully-qualified name for each reference to a table or view that omits
> the owner name; here are the steps that accomplish that task:
>
> 1. If there is a local temporary table with a matching name, then the
> search is over: the temporary table is the one to use.
>
> 2. If there is a global temporary or permanent table or view with a
> matching name that is owned by the current user id, then the search is
> over: that's the table or view to use.
>
> 3. If there is exactly one table or view with a matching name that is
> owned by some group that the current user id is a member of, then the
> search is over; that table or view is the one to use. This search
> isn't affected by any hierarchical relationships that might exist
> among the groups that the current user id is a member of; all the
> groups are treated equally by the search.
>
> 4. If more one table or view with a matching name is found in Step 3,
> each owned by a different group that the current user id is a member
> of, it's an error: "Table 'x' is ambiguous".
>
> 5. If no table or view with a matching name is found, it's an error:
> "Table 'x' not found".
> =====
>
> Breck
>
>
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
> bcarter@risingroad.com
> Mobile and Distributed Enterprise Database Applications
> www.risingroad.com