Create a read-only login in SQL Server

Source: Internet
Author: User
Tags bulk insert

Create a login in SQL Server and grant the read-only permission to this login

--Create Login Namecreate login [domain\ Login from windows;< Span style= "color: #008080;" >--create--usernamecreate user dwreadonly for Login [domain\login]< Span style= "color: #008080;" >--grant readonlyalter ROLE [db_datareader add MEMBER dwreadonly             

Appendix

Server role Reference (can operate on a database)

Bulkadmin can run BULK INSERT statement BULK INSERT verbose http://blog.csdn.net/jackmacro/article/details/5959321

DBCreator Create, modify, delete, restore any database

Diskadmin managing disk Files

Processadmin can terminate a program that runs in an instance of the database engine

Securityadmin can manage logins and their properties, have Grant,deny, and revoke server and database-level permissions, and can reset passwords for SQL Server logins

ServerAdmin can change server-wide configuration options and shut down the server

Setupadmin can add and remove linked servers and execute stored procedures (such as sp_serveroption) on certain systems that can execute

The sysadmin makes any activity in SQL Server, which feels that the permissions span all other fixed server roles, by default, all members of the Windows Builtin\admin Group (local Administrators group) are sysadmin Members of fixed server roles

User Mapping Reference (can operate on database data)

DB_Owner users who can perform all the technical actions in the database

Db_accessadmin can add, delete user's user

Db_datareader can view data from user tables in all databases

Db_datawrite can add, modify, and delete data from all database user tables

db_ddladmin user that can perform DDL operations in the database,creation of DDL (Data Definition Language) tables, and management

Db_securityadmin can manage users in the database for all actions related to security permissions

Db_backoperator users who can back up the database (DBCC and CHECKPOINT statements can be published, which are typically used before the backup

Db_denydatareader users who cannot see any data in the database

Db_denydatawrite Users who cannot modify any data in the database

Reference Documentation:

Create a read-only login in SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.