Click to See Complete Forum and Search --> : Permissions for new user in SQL Server


irona20
July 10th, 2003, 02:38 AM
Hi!

I have a database, and all tables, views... belong to user 'dbo'.
I have created a new user 'foro' and a new session for that user.

I know that I can write something like this:

GRANT UPDATE, DELETE, INSERT, SELECT
ON table_1
TO FORO

But I have many tables, views, procedures... Is there any way to grant all permissions for all tables, views, procedures... in my database for user 'foro'.

Thank you in advance.

antares686
July 10th, 2003, 06:14 AM
Make user a member of the db_datareader and db_datawriter roles of the database to grant those on all tables and views.

For stored procedures you will have to go thru and grant execute rights on each procedure. But you can script this out for quick doing or if you may need to create other users with the same permissions create a role, grant the role execute rights to the procedures and make the user accounts members of this new role.

irona20
July 11th, 2003, 02:12 AM
Thank you very much antares!

I resolved my problem adding the user to function db_owner.

antares686
July 11th, 2003, 06:57 AM
The only concern I would be carefull with there is they now have the rights to create and delete the objects themselves not just the data within.