Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Sharing tables btw. users in same NT group

Author  Topic 

niras
Starting Member

3 Posts

Posted - 2002-02-07 : 15:55:12
Hi
This is the case:
I'm having X users in my NT domain. A minor number of these is member og a NT Group: dbusers.
In SQL Server I have created a login for dbusers.
The dbusers has been granted rights to the database MYDB.

Now user Peter (member of the dbusers grouop) connects to SQL Server. He creates a table mytab, and becomes the owner of this table. Afterwards he grants select-rights to public and to dbusers.

Later on user Bob (also a member of dbusers) connects to SQL Server. The problem is: He cannot select from mytab. Neither from MYDB.Peter.mytab. In both case this error occours:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'mytab'.

What's wrong ?

Is it possibly for a GROUP to be owner of a table ? Or does it have to be one specific user, who is tableowner. How can other users make selects (and inserts etc) in that table ? Notice: The user has NOT got his own login, but i authorized to SQL Server via his NT GROUP account.

Pleas help

Torsten



chadmat
The Chadinator

1974 Posts

Posted - 2002-02-07 : 16:31:39
What user is mapped to the group login?

Check in Enterprise Manager for the user (Under the Database group)

Or you can just open the tables under the database, and it will show the owner.

Most likely the owner of the table is dbusers.

So:
select * from MYDB.dbusers.mytab

should work

-Chad

Go to Top of Page

niras
Starting Member

3 Posts

Posted - 2002-02-08 : 03:45:15
Thanks for your reply Chad !

Unfortunally the owner of mytab is 0001037D836F\peter (I thought it would be dbusers).
This select:
select * from MYDB.0001037D836F\peter.mytab
returns:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '.0001037'.

This select:
select * from MYDB.dbusers.mytab
returns
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'MYDB.dbusers.mytab'.

Any other suggestions ?

Torsteb


Go to Top of Page

niras
Starting Member

3 Posts

Posted - 2002-02-08 : 05:32:23
I found a solution in this tech. artic:
http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000409

To refer to a domine\user account use brackets []:
select * from MYDB.[0001037D836F\peter].mytab

THIS WORKS !!!!

Torsten

Go to Top of Page
   

- Advertisement -