Re: Permission question - another one

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Thomas Scheiderich (tfs_at_deltanet.com)
Date: 08/13/04


Date: Fri, 13 Aug 2004 14:49:28 -0700


"Tim S" <stahta01@juno.com> wrote in message
news:10hbhjs4f57ph12@corp.supernews.com...
> Thomas:
>
> You might see if running SELECT SYSTEM_USER, SESSION_USER, USER,
> CURRENT_USER
> It could help you to understand the difference.
>
> Note: You once said you removed yourself from the administrators group,
the
> removal most likely would NOT take affect till your logged out and logged
> back on. You can test this by trying to re-add you to the Administrator
> group if it lets you then you are still administrator.

Right. As a matter a fact, I took myself (tfs) out of all of the Server
Roles just for my testing.

There is no user defined my Sql Server as "TRAVAC/tfs" (even though a couple
of my databases show TRAVAC/tfs as the owner - when I right click the
database in EM).

For my test here, I connected using Windows Authentication (therefore I am
shown as TRAVAC/tfs - if I log on with SQL Authentication - I am shown as
tfs).

Unless I am mistaken, I was told that tfs and TRAVAC/tfs are different users
with different permissions. Here is what I have when I do the above selects
(as well as some Kalen asked me to do):

suser_sname() = TRAVAC/tfs
user_name() = dbo
current_user = dbo
user = dbo
system_user = TRAVAC/tfs
session_user = dbo

Now, TRAVAC/tfs is not defined (and was never defined as a user). If I look
at my users I see:
BUILTIN/Administrators, josef, sa, TRAVAC\jon.

Why am I begin shown as dbo of VDW?

If I log on using Sql Authentication as tfs, I get the following:

suser_sname() = tfs
user_name() = tfs
current_user = tfs
user = tfs
system_user = tfs
session_user = tfs

I understand the Sql Authentication results. I don't understand the Windows
Authentication results (TRAVAC/tfs). Why is it dbo and why do I get access
at all? Somewhere outside of Sql Server must be giving me access, I assume.
I just can't seem to figure out where.

Thanks,

Tom.
>
> Tim S
>
>



Relevant Pages

  • Re: Permission question - another one
    ... Does your Windows Login TRAVAC/tfs belong to the local Administrators group? ... As you told us below, that NT GROUP has been granted rights to SQL Server, ... role uses the username dbo in any database. ... I took myself (tfs) out of all of the Server ...
    (microsoft.public.sqlserver.programming)
  • Re: db_owner role in SQL 2k
    ... DBO is just a user ... > I presume then that you are logged in as tfs. ... I am logged on to my server as tfs when I do the 2 selects ... permission - and tfs - which is sysadmin - I would have assumed that EM ...
    (microsoft.public.sqlserver.programming)
  • Re: db_owner role in SQL 2k
    ... I just took tfs out of all of the Server Roles and I could not access VDW at ... I assume that my user_namewas dbo because I was a sysadmin at the time. ...
    (microsoft.public.sqlserver.programming)
  • Re: DBO/Permissions questions
    ... In your other post, you said that when you logged in as tfs, you had the ... user name of dbo, but here you say the user name is tfs. ... sysadmin role, then he will have full permission to do anything even without ... > I am trying to understand this whole permissions thing. ...
    (microsoft.public.sqlserver.programming)
  • Re: db_owner role in SQL 2k
    ... I do the select user_nameand get dbo ... Do you mean EM lists VDW as the owner of the database? ... I presume then that you are logged in as tfs. ... So my guess is that the login tfs is in the sysadmin role on the server, ...
    (microsoft.public.sqlserver.programming)