Re: Error 21776:



Anyone ever see this sort of behavior?

Yes, this is normal. The GUI object browser caches data for performance
reasons. When changes are made externally, you need to manually refresh the
tree by right-clicking and selecting refresh.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"A McGuire" <allen.mcguire@xxxxxxxxxxxxxxxxx> wrote in message
news:uwaWqeatGHA.1888@xxxxxxxxxxxxxxxxxxxxxxx
I'm doing the following:

use master
exec sp_grantlogin 'DOMAIN\ug_ITSec_SQL'
exec sp_addsrvrolemember 'DOMAIN\ug_ITSec_SQL', 'securityadmin'

Then after, trying to grant that new login db_owner permissions, for
example, by running the following:

use master
go
exec sp_grantdbaccess 'DOMAIN\ug_ITSec_SQL', 'ug_ITSec_SQL'
exec sp_addrolemember 'db_owner','ug_ITSec_SQL'


However, when I then click on the Login and check out the database access,
I get the following strange error:
"Error 21776: [SQL-DMO] The name 'ug_ITSec_SQL' was not found in the Users
collection. If the name is a qualified name use [] to seprate the various
parts of the name, then try again."

However, once I go to the individual database - master in this case, and
click on the User, view it, close it, and go back to the Login... it is
all cleared up. As if clicking and viewing the User in the database
cleared something up?

Anyone ever see this sort of behavior?



.



Relevant Pages

  • New Login Question
    ... I have been programming with Sql Server 2000 for 2-3 years ... I noticed that at the bottom of the New login dialog there ... One selects a database to log in to ... dropdown always has master listed. ...
    (microsoft.public.sqlserver.security)
  • New Login Question
    ... The database login ... >dropdown always has master listed. ... >what is the significance of the database dropdown on the ...
    (microsoft.public.sqlserver.security)
  • Re: Error 21776:
    ... use master ... exec sp_addsrvrolemember 'DOMAIN\ug_ITSec_SQL', 'securityadmin' ... Then after, trying to grant that new login db_owner permissions, for ... However, when I then click on the Login and check out the database access, ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Default Login?
    ... The guest database user provides logins with a security context when ... they haven't been explicitly granted database access. ... You can ignore the default login reported by xp_loginconfig. ... > Master Database. ...
    (microsoft.public.sqlserver.security)