Re: Error 21776: After creating new login

From: Jasper Smith (jasper_smith9_at_hotmail.com)
Date: 03/31/04


Date: Wed, 31 Mar 2004 19:27:40 +0100

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


Relevant Pages

  • Re: Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked
    ... I would still try to import the data into your SQL Server instance instead of running linked server queries as you are doing. ... I can query it with no problem and view tabs in Studio. ... EXEC master.dbo.sp_addlinkedserver ...
    (microsoft.public.sqlserver.programming)
  • Re: No more indexing on text
    ... Looking for a SQL Server replication book? ... DROP FULLTEXT CATALOG CmpArchivorCat ... exec sp_fulltext_catalog 'CmpArchivorCat', 'create' ... both text/plain and text/html in my file type column. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Running a DTS Job from a stored procedure
    ... We are running SQL Server 2000. ... -- Create a Pkg Object ... EXEC sp_DisplayOAErrorInfo @oPKG, @hr ...
    (microsoft.public.sqlserver.dts)
  • Re: Error 21776: After creating new login
    ... EXEC DATA0003.dbo.sp_addlogin 'test','pwd' ... > another SQL Server session is not visible to the SQL-DMO session. ... > Jasper Smith ... >> Users collection. ...
    (microsoft.public.sqlserver.security)
  • Re: Auto truncate a string to be inserted to SQL table
    ... EXEC p --Warning was not returned ... Tibor Karaszi, SQL Server MVP ... >> Tibor Karaszi, SQL Server MVP ... >>> message is given...i might need to just truncate the string without halting>>> the process... ...
    (microsoft.public.sqlserver.programming)