Showing posts with label grant. Show all posts
Showing posts with label grant. Show all posts

Sunday, February 19, 2012

ERROR 229: SELECT permission denied on object sysobjects, database ....

Hi,

I granted all the rights on the database to the user (db_owner, public, db_datawriter, etc...) However, I didn't grant the "System Administrators" role. I also specifically granted the select on those tables (sysobjects and sysindexes) for the user and checked through sp_helprotect sysobjects command whether there are no specific revokes for for that user.

However, the user is still getting the below error while trying to expand the "Tables" view in the Enterprise Manager.

ERROR 229: SELECT permission denied on object 'sysobjects', database 'My_test', owner 'dbo', SELECT permission denied on object 'sysindexes', database 'My_test', owner 'dbo'.

Also, the user claims that he cant seem to do anything with the database, he cant view any objects, and, when he goes to Query Analyzer, if he tries to run a SELECT query on a table (that he know that this table exists), he gets this error:



SELECT permission denied on object 'tblBillingTrans', database 'My_Test', owner 'dbo'.

Any help would be greatly appreciated!
Thanks,
AllaPlease disregard this question... I granted the db_denydatareader option... :p

Friday, February 17, 2012

Error 21776 [SQL DMO]

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 messag
e:
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 t
he
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...
>
>|||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

Error 21776 [SQL DMO]

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
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
|||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...
>
>
|||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

Error 21776 [SQL DMO]

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