Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Free Databases support forum > Microsoft SQL server > SQL Server Security > Error 21776: After creating new login




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Error 21776: After creating new login  
Bob Haines


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-31-04 04:39 PM

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





[ Post a follow-up to this message ]



    Re: Error 21776: After creating new login  
Jasper Smith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-31-04 06:42 PM

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







[ Post a follow-up to this message ]



seemag is offline     Re: Re: Error 21776: After creating new login  
seemag


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for seemag Click here to Send seemag a Private Message Find more posts by seemag Add seemag to your buddy list
 
02-18-05 11:39 AM

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


quote:
Originally posted by Jasper Smith 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




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:31 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

Back To The Top
Home | Usercp | Faq | Register