Re: Getting username
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Dec 2005 12:55:23 -0600
> For short time I've been added to sysadmin group
>
> From now on when i create new database it get DB owner
I don't understand your question. The expected behavior is that the
database will be owned by your login when you create the database. You can
change the database owner after creation using sp_changedbowner.
> And when use SELECT User i still get my name and not dbo.
Sysadmin role members are mapped to the 'dbo' user in all databases so this
will return 'dbo'. You can retrieve the current login using SELECT
SUSER_SNAME().
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Roy Goldhammer" <roy@xxxxxxxxxxx> wrote in message
news:%23UT5BZLBGHA.3064@xxxxxxxxxxxxxxxxxxxxxxx
> Hello there
>
> For short time I've been added to sysadmin group
>
> From now on when i create new database it get DB owner
>
> And when use SELECT User i still get my name and not dbo.
>
> That is fine. The question is how can i do that?
>
>
.
- References:
- Getting username
- From: Roy Goldhammer
- Getting username
- Prev by Date: Re: Detailed User Access Rights
- Next by Date: Re: Database Level Security Doubt in SQL6.5
- Previous by thread: Getting username
- Next by thread: Optimization Blows up T-Log
- Index(es):
Relevant Pages
|
|