How to set sql database permissions

How should I control a new user in SQL2008 to specify a database for which I need to have all table query permissions and view creation permissions?

1, in the database machine with the use of cmd command to call out the command line window, and then use sqlplus/ assysdba login to the database. And connect to the database with the owner of the table to which you want to grant permissions, otherwise the subsequent granting of permissions will fail.

2, create user create user test identifiedby test123; create user test, password set to test123.

3, authorize user test to connect, resource permissions. grant connect, resource to test.

4, specify the table authorization query permissions. grant selectonuser.tablenametotes.

5, with a new login database for verification, we first try to delete delete data, the results report an error can not be executed, indicating that we added users do not have delete privileges.

6, and then to verify the select query function, successfully find the specified data. New user and specify the query permission function to achieve. At the same time, the query does not assign permissions to the table, the same is rejected.

How to set SQL database user permissions

Now set user roles inside security and then go to the database and set user permissions.

How to set MSSQL database access users and access rights

1. Open Enterprise Manager ……. Go to sql

server group ………. Security2.Create, select the user you are setting permissions for, right-click Properties!3.Click on the title bar under the database access to its users to set the data and database roles that give access to.4.Click OK, to complete the setup of the mssql database access users and access privileges

(Responsibility: winiis)