how to give a user full dbo over a single table in a db

How do you give a single user - full dbo / alter on just 1 table in database
LVL 1
JElsterAsked:
Who is Participating?
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You can GRANT ALTER but this won't permit the user to create the table. Only alter it:
GRANT ALTER ON TableName TO UserName
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Create the table in the user schema.
0
 
JElsterAuthor Commented:
don't understand
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
By default the objects are created on dbo schema so you refer to an object as dbo.ObjectName. dbo stands for DataBaseOwner.
But each user as is own schema so it can creates objects on his own schema and later just need to refer to the object as user.ObjectName.

So the creation statement should be something like:
CREATE TABLE user.TableName
(...)
0
 
JElsterAuthor Commented:
So I have to recreate with the user name?
Can't  just give permissions
0
 
JElsterAuthor Commented:
Still can't alter or modify the table

- Not the table owner
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
The grant command need to be executed by the owner of the table or an user with dbowner role.
0
 
JElsterAuthor Commented:
Still get the warning messages
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Which warning messages?
0
 
JElsterAuthor Commented:
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
That warning is when you try to change the table?
During the GRANT operation you didn't get any message?
0
 
JElsterAuthor Commented:
yes
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Issue was solved?
0
 
JElsterAuthor Commented:
YES
THX
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Great.
Cheers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.