Re: Error 21776: After creating new login
From: seemag (seemag.1knj8z_at_mail.webservertalk.com)
Date: 02/18/05
- Next message: Narayana Vyas Kondreddi: "Re: Recurring login failure message"
- Previous message: Sophie Guo [MSFT]: "Re: SQL Server Enterprise Manager blcoked by Firewall?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 18 Feb 2005 06:39:51 -0600
try this
type:
use DATA0003
before :
EXEC DATA0003.dbo.sp_addlogin 'test','pwd'
EXEC DATA0003.dbo.sp_grantdbaccess 'test'
EXEC DATA0003.dbo.sp_addrolemember 'Full','test'
and execute it. this may solve the problem
Jasper Smith wrote:
> *EM uses SQLDMO and caches a lot of the information you see. In
> general this
> is a good thing. I don't believe there is any way to alter the
> behaviour in
> Enterprise Manager. See this note from BOL about SQLDMO collections
>
> "To enable more efficient processing, SQL-DMO caches much of the
> information
> about SQL Server components referenced by objects maintained in a
> collection. When component data is cached, administrative activity
> of
> another SQL Server session is not visible to the SQL-DMO session.
> The
> Refresh method queries the organization server, filling the
> collection with
> the most up-to-date component information."
>
> --
> HTH
>
> Jasper Smith (SQL Server MVP)
>
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
>
>
> "Bob Haines" <bhaines@pahousegop.com> wrote in message
> news:164f901c4173c$4c0e51e0$a501280a@phx.gbl...
> > I run this code:
> > EXEC DATA0003.dbo.sp_addlogin 'test','pwd'
> > EXEC DATA0003.dbo.sp_grantdbaccess 'test'
> > EXEC DATA0003.dbo.sp_addrolemember 'Full','test'
> >
> > When I go into enterprise and go to the properties of
> > login and to Data Access Tab and select the Data0003
> > (which is checked) I get this error:
> > Error 21776:[SQL-DMO]The name 'test' was not found in the
> > Users collection. If the name is a qualified name, use
> > [] to separte various parts of the name, and try again.
> >
> > The only way I found to get rid of the error is to go to
> > DATA0003 and select the users and refresh the list.
> > Then, their is no problem.
> > But, I would like to not have to go refresh user
> > everytime I add a login.
> >
> > I would appreciate any help.
> > Thanks in advance,
> > Bob *
-- seemag ------------------------------------------------------------------------ Posted via http://www.webservertalk.com ------------------------------------------------------------------------ View this thread: http://www.webservertalk.com/message168173.html
- Next message: Narayana Vyas Kondreddi: "Re: Recurring login failure message"
- Previous message: Sophie Guo [MSFT]: "Re: SQL Server Enterprise Manager blcoked by Firewall?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]