Wednesday, March 21, 2012

I can't add a user in "Security/Logins"

Good morning everyone,
I've a user listed in "Security/Logins".
If I right/click a database, Properties, "Permission" tab, I can't "Add" it
to database's "Users or roles": if I "Browse" for users, it isn't listed. How
can I add?Under Security - Logins, right-click the user and hit properties. (IN
SQL 2000)Go to the database access tab, select the db you want to grant
access to then give the rights below. By default, you only grant
public.
natasha wrote:
> Good morning everyone,
> I've a user listed in "Security/Logins".
> If I right/click a database, Properties, "Permission" tab, I can't "Add" it
> to database's "Users or roles": if I "Browse" for users, it isn't listed. How
> can I add?|||Yes, and in SQL 2005 "database access" tab has been substituted by "User
mapping" tab. But, owner of the database is dbo, and differently from other
DBs, I can't substitute, even if I am the super-non-plus-ultra-admin.
Is there any way to force a "take ownership" of the database?
"PSPDBA" ha scritto:
> Under Security - Logins, right-click the user and hit properties. (IN
> SQL 2000)Go to the database access tab, select the db you want to grant
> access to then give the rights below. By default, you only grant
> public.
> natasha wrote:
> > Good morning everyone,
> > I've a user listed in "Security/Logins".
> > If I right/click a database, Properties, "Permission" tab, I can't "Add" it
> > to database's "Users or roles": if I "Browse" for users, it isn't listed. How
> > can I add?
>|||Have you tried using the following stored procedure on the database where you
wnat the user to have access to:
EXEC sp_adduser 'loginname', 'username'
See if that works or give any error?
Lucas
"natasha" wrote:
> Yes, and in SQL 2005 "database access" tab has been substituted by "User
> mapping" tab. But, owner of the database is dbo, and differently from other
> DBs, I can't substitute, even if I am the super-non-plus-ultra-admin.
> Is there any way to force a "take ownership" of the database?
>
> "PSPDBA" ha scritto:
> > Under Security - Logins, right-click the user and hit properties. (IN
> > SQL 2000)Go to the database access tab, select the db you want to grant
> > access to then give the rights below. By default, you only grant
> > public.
> >
> > natasha wrote:
> > > Good morning everyone,
> > > I've a user listed in "Security/Logins".
> > > If I right/click a database, Properties, "Permission" tab, I can't "Add" it
> > > to database's "Users or roles": if I "Browse" for users, it isn't listed. How
> > > can I add?
> >
> >|||I tried to, and I've quite a curious error:
Msg 15063, Level 16, State 1, Line 1
The login already has an account under a different user name.
"Lucas Kartawidjaja" ha scritto:
> Have you tried using the following stored procedure on the database where you
> wnat the user to have access to:
> EXEC sp_adduser 'loginname', 'username'
> See if that works or give any error?
> Lucas
> "natasha" wrote:
> > Yes, and in SQL 2005 "database access" tab has been substituted by "User
> > mapping" tab. But, owner of the database is dbo, and differently from other
> > DBs, I can't substitute, even if I am the super-non-plus-ultra-admin.
> > Is there any way to force a "take ownership" of the database?
> >
> >
> >
> > "PSPDBA" ha scritto:
> >
> > > Under Security - Logins, right-click the user and hit properties. (IN
> > > SQL 2000)Go to the database access tab, select the db you want to grant
> > > access to then give the rights below. By default, you only grant
> > > public.
> > >
> > > natasha wrote:
> > > > Good morning everyone,
> > > > I've a user listed in "Security/Logins".
> > > > If I right/click a database, Properties, "Permission" tab, I can't "Add" it
> > > > to database's "Users or roles": if I "Browse" for users, it isn't listed. How
> > > > can I add?
> > >
> > >|||> Is there any way to force a "take ownership" of the database?
sp_changedbowner
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"natasha" <natasha@.discussions.microsoft.com> wrote in message
news:FBFC25FE-C6C8-4B8E-A769-419169EF1DDB@.microsoft.com...
> Yes, and in SQL 2005 "database access" tab has been substituted by "User
> mapping" tab. But, owner of the database is dbo, and differently from other
> DBs, I can't substitute, even if I am the super-non-plus-ultra-admin.
> Is there any way to force a "take ownership" of the database?
>
> "PSPDBA" ha scritto:
>> Under Security - Logins, right-click the user and hit properties. (IN
>> SQL 2000)Go to the database access tab, select the db you want to grant
>> access to then give the rights below. By default, you only grant
>> public.
>> natasha wrote:
>> > Good morning everyone,
>> > I've a user listed in "Security/Logins".
>> > If I right/click a database, Properties, "Permission" tab, I can't "Add" it
>> > to database's "Users or roles": if I "Browse" for users, it isn't listed. How
>> > can I add?
>>|||Hmm... interesting.
I think you might want to try to run the following script on the database
that the user need to access:
EXEC sp_dropuser 'username'
GO
and then run the:
EXEC sp_adduser 'loginname', 'username'
GO
see if that works.
Lucas
"natasha" wrote:
> I tried to, and I've quite a curious error:
> Msg 15063, Level 16, State 1, Line 1
> The login already has an account under a different user name.
>
>
>
> "Lucas Kartawidjaja" ha scritto:
> > Have you tried using the following stored procedure on the database where you
> > wnat the user to have access to:
> > EXEC sp_adduser 'loginname', 'username'
> >
> > See if that works or give any error?
> >
> > Lucas
> >
> > "natasha" wrote:
> >
> > > Yes, and in SQL 2005 "database access" tab has been substituted by "User
> > > mapping" tab. But, owner of the database is dbo, and differently from other
> > > DBs, I can't substitute, even if I am the super-non-plus-ultra-admin.
> > > Is there any way to force a "take ownership" of the database?
> > >
> > >
> > >
> > > "PSPDBA" ha scritto:
> > >
> > > > Under Security - Logins, right-click the user and hit properties. (IN
> > > > SQL 2000)Go to the database access tab, select the db you want to grant
> > > > access to then give the rights below. By default, you only grant
> > > > public.
> > > >
> > > > natasha wrote:
> > > > > Good morning everyone,
> > > > > I've a user listed in "Security/Logins".
> > > > > If I right/click a database, Properties, "Permission" tab, I can't "Add" it
> > > > > to database's "Users or roles": if I "Browse" for users, it isn't listed. How
> > > > > can I add?
> > > >
> > > >

No comments:

Post a Comment