Link to home
Start Free TrialLog in
Avatar of lankapala
lankapala

asked on

sql server 2008R2 permssion issue

Hi,
I have created user and given permssion to  db_owner for Test database.
But user complaining user can't create stored procedure or View.
I have given grant using following command but still user can't create store procedure.
What iam missing

use [App_Test]
GRANT EXECUTE ON SCHEMA::[dbo] TO [user1]
GRANT EXECUTE ON DATABASE:: App_Test  TO [user1]

USE  [App_Test]
GRANT CREATE PROCEDURE TO [user1]    
GRANT SELECT, INSERT, UPDATE, DELETE, ALTER, EXECUTE, VIEW DEFINITION ON SCHEMA::dbo TO [user1]
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Better, if you could please login as [user1], attempt to create a stored procedure and post the complete error message here.
Why not grant all on the database to user1?

https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-transact-sql

You are granting user on schema.......
lankapala, do you still need help with this question?
Avatar of lankapala
lankapala

ASKER

Yes please
Please post what issues you are running into.
You have to grant the users rights they need.

Many times the needs of a developer evolve where what they need initially changes.
Your grant create procedure

What issue and on what db is the user is running into a block?

I find it useful to narrow the issue, by asking the user to show me what they are trying to do in an effort to make sure that what they are asking for and what they are doing matches up.
I have created user and given permssion to  db_owner for Test database.
The db_owner privilege should be enough for the user be able to create any object in the database.
Can you provide a screenshot where it shows that this privileged has been granted?
Hi, My apologies for late reply. See atatched screenshot
Permissions.png
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.