SQL user

Hi,

I need to setup a SQL user for frontend to connect.  What database role I should check?
It needs to be able to execute sp, insert new record, update/delete records.

I have checked db_datareader and db_datawriter and public

thx
mcrmgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
that seems to be fine
0
mcrmgAuthor Commented:
I am getting this error

The EXECUTE permission was denied on the object 'st_aaa', database 'my_DB', schema 'dbo'.

thx
0
Aneesh RetnakaranDatabase AdministratorCommented:
seems like that is a stored procedure,  you need to grant the EXECUTE permission for the sps to

GRANT EXEC ON spName to theUsername
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

jlsilva01Commented:
You can run:

GRANT EXECUTE TO login ;
0
mcrmgAuthor Commented:
DO I have to do this to every sp? thx
0
jlsilva01Commented:
If you do a login, you don't need to do to each proc.
0
jlsilva01Commented:
Sorry my English...

If you do execute for all logins, you don't need to do for each proc, cause all procs already grant to public.
0
mcrmgAuthor Commented:
where can I set it?  thx
0
jlsilva01Commented:
I use this script to create a new user and set the permissions:

CREATE LOGIN [LOGIN_NAME] WITH PASSWORD=N'XXXXX', DEFAULT_DATABASE=[DATABASE_NAME], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
CREATE USER [LOGIN_NAME] FOR LOGIN [LOGIN_NAME] WITH DEFAULT_SCHEMA=[dbo]
GO
EXEC sp_addrolemember 'db_datareader', [LOGIN_NAME]
GO
EXEC sp_addrolemember 'db_datawriter', [LOGIN_NAME]
GO
GRANT EXECUTE TO [LOGIN_NAME]
GO
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mcrmgAuthor Commented:
I see, there is no way to do this via GUI?  thx
0
jlsilva01Commented:
yes...

You click with right button on database and choose properties. After this, you click on Permissions... click on user name on "user or roles box" and checkbox a grant to execute item.
database-properties.png
0
mcrmgAuthor Commented:
thanks again..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

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.