Created Table but don't have permission to insert into it

dfr031260
dfr031260 used Ask the Experts™
on
Granted Create Table and Alter Schema to a user.  The user can create a table, but can not insert into it.  When the user attempts to grant insert right to himself the grant fails.

What am I doing wrong here?

Dav
create table testerito
(testid int)
go
 
grant insert,select on testerito to dwhadmin
go
 
insert into testerito
(testid)
values
(1)
go

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AneeshDatabase Consultant
Top Expert 2009

Commented:
>When the user attempts to grant insert right to himself the grant fails.
Only Admins can Grant the previlege, you have to logon to some admin account and grant the above user the permission

Commented:
User cannot grant himself the rights. User with SQL Server Admin priviliges can do that for him.
P.

Author

Commented:
I had to make the user datareader and datawriter on the database, then it worked.

Does that make any sense?

Author

Commented:
I removed the grant altogether
Database Consultant
Top Expert 2009
Commented:
thats the easiest option in case you have to grant the permissions for all the tables

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial