[comp.databases] Sybase grant problem

etxstwi@juno.ericsson.se (Stefan Wikstrom TM/JUF 7191288) (10/11/90)

I have not been able to grant select, or any other access permissions for
a table owned by myself to other users in Sybase and I cannot see why it
shouldn't work. What I have been doing is:

 GRANT SELECT ON myowntable TO user2

When user2 tries to select myowntable error message 208, level 16,
state 1, is displayed, "Invalid object name 'myowntable'."
We are both using the same database.

When issuing the stored procedure sp_helprotect on user2 the grant on
SELECT for the table is displayed.

select object_id("myowntable") gives NULL for user2. However the opposite
action select object_name(id-number) gives "myowntable".

I have been using the db-library, isql and dwb when issuing the SELECT
statement and none have worked.

Can someone enlighten me on this problem?

/Stefan

jeffl@sybase.Sybase.COM (Jeff Lichtman) (10/14/90)

> I have not been able to grant select, or any other access permissions for
> a table owned by myself to other users in Sybase and I cannot see why it
> shouldn't work.

To select from a table you don't own, you must specify the owner:

	select * from user1.myowntable

The only exception is when the table is owned by the dbo.  You do not
have to specify the owner to see a dbo table.
---
Jeff Lichtman at Sybase
{mtxinu,pacbell}!sybase!jeffl  -or- jeffl@sybase.com
"Saints should always be judged guilty until they are proved innocent..."