HELLO,
I have a bunch of users I need to change their defult db's and grant access
to that db, so I run the following script:
EXEC sp_defaultdb 'CGallego' , 'CRCS'
exec sp_grantdbaccess 'CGallego', 'CGallego'
When I go into EM to view their properties, I get the following error message:
Error 21776 [SQL DMO] The name 'CGallego' was not found in the Users
Collection.
If the name is a qualified name use [] to seprate the various parts of the
name.
How can I resolve this issue. Thanks.
--
New SQL Server DBAHi,
Looks like the database owner for CRCS database is not available in
syslogins table. Did you restored this database from any other server.
If yes then the Login may not be there in Syslogins table. In that case
change the database owner using the stored procedure sp_changedbowner (see
books online for the usage)
Thanks
hari
SQL Server MVP
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:60DAE6E4-8738-42AD-A44B-D4639BE8501D@.microsoft.com...
> HELLO,
> I have a bunch of users I need to change their defult db's and grant
> access
> to that db, so I run the following script:
> EXEC sp_defaultdb 'CGallego' , 'CRCS'
> exec sp_grantdbaccess 'CGallego', 'CGallego'
> When I go into EM to view their properties, I get the following error
> message:
> Error 21776 [SQL DMO] The name 'CGallego' was not found in the Users
> Collection.
> If the name is a qualified name use [] to seprate the various parts of the
> name.
> How can I resolve this issue. Thanks.
> --
> New SQL Server DBA|||The owner of the db is sa and is in the syslogins table.
--
New SQL Server DBA
"Hari Prasad" wrote:
> Hi,
> Looks like the database owner for CRCS database is not available in
> syslogins table. Did you restored this database from any other server.
> If yes then the Login may not be there in Syslogins table. In that case
> change the database owner using the stored procedure sp_changedbowner (see
> books online for the usage)
> Thanks
> hari
> SQL Server MVP
> "Newbie" <Newbie@.discussions.microsoft.com> wrote in message
> news:60DAE6E4-8738-42AD-A44B-D4639BE8501D@.microsoft.com...
> > HELLO,
> >
> > I have a bunch of users I need to change their defult db's and grant
> > access
> > to that db, so I run the following script:
> >
> > EXEC sp_defaultdb 'CGallego' , 'CRCS'
> > exec sp_grantdbaccess 'CGallego', 'CGallego'
> >
> > When I go into EM to view their properties, I get the following error
> > message:
> >
> > Error 21776 [SQL DMO] The name 'CGallego' was not found in the Users
> > Collection.
> > If the name is a qualified name use [] to seprate the various parts of the
> > name.
> >
> > How can I resolve this issue. Thanks.
> > --
> > New SQL Server DBA
>
>|||make sure CGallego is a valid SQL login first..
Then perhaps try to do sp_grantdbaccess first, then defaultdb..
also check sp_helpuser... Perhaps the sps are working properly,but you are
having trouble with SEM which is not related to your scripts.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Newbie" <Newbie@.discussions.microsoft.com> wrote in message
news:60DAE6E4-8738-42AD-A44B-D4639BE8501D@.microsoft.com...
> HELLO,
> I have a bunch of users I need to change their defult db's and grant
> access
> to that db, so I run the following script:
> EXEC sp_defaultdb 'CGallego' , 'CRCS'
> exec sp_grantdbaccess 'CGallego', 'CGallego'
> When I go into EM to view their properties, I get the following error
> message:
> Error 21776 [SQL DMO] The name 'CGallego' was not found in the Users
> Collection.
> If the name is a qualified name use [] to seprate the various parts of the
> name.
> How can I resolve this issue. Thanks.
> --
> New SQL Server DBA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment