当前位置:网站首页>sqlserver SQL Server Management Studio和Transact-SQL创建账户、创建访问指定数据库的只读用户
sqlserver SQL Server Management Studio和Transact-SQL创建账户、创建访问指定数据库的只读用户
2022-06-30 17:46:00 【但行益事莫问前程】
前言
1. Create a Login
文档中介绍了using SQL Server Management Studio (SSMS) 和Transact-SQL2种方式,本人创建只读账户使用的第一种方式;
2. 创建访问指定数据库的只读用户
(1)使用Microsoft SQLServer Management Studio,用管理员账户登录
(2)点击【安全性】->【登录名】,选择【新建登录名】
(3)在【常规】选项【登录名】中输入用户名 cz。身份验证选择【SQL Server 身份验证】,输入密码,取消勾选【强制实施密码策略】
(4)点击选项页【用户映射】->【映射到此登录名的用户】,选择创建的cz用户可操作的数据库。针对每一个数据库,在下方【数据库角色成员身份】中勾选成员身份,即可获取身份对应的权限,如只读权限,即勾选【db_datareader】。同时【默认架构】中亦勾选【db_datareader】

(6)只读用户cz创建成功
连接成功:
修改数据报错:
备注:服务器角色

bulkadmin check box
Members of the bulkadmin fixed server role can run the BULK INSERT statement.
dbcreator check box
Members of the dbcreator fixed server role can create, alter, drop, and restore any database.
diskadmin check box
Members of the diskadmin fixed server role can manage disk files.
processadmin check box
Members of the processadmin fixed server role can terminate processes running in an instance of the Database Engine.
public check box
All SQL Server users, groups, and roles belong to the public fixed server role by default.
securityadmin check box
Members of the securityadmin fixed server role manage logins and their properties. They can GRANT, DENY, and REVOKE server-level permissions. They can also GRANT, DENY, and REVOKE database-level permissions. Additionally, they can reset passwords for SQL Server logins.
serveradmin check box
Members of the serveradmin fixed server role can change server-wide configuration options and shut down the server.
setupadmin check box
Members of the setupadmin fixed server role can add and remove linked servers, and they can execute some system stored procedures.
sysadmin check box
Members of the sysadmin fixed server role can perform any activity in the Database Engine.
边栏推荐
- Tide - 基于 async-std 的 Rust-web 框架
- 【TiDB】TiCDC canal_json的实际应用
- How to do a good job in software system demand research? Seven weapons make it easy for you to do it
- LeetCode动态规划经典题(一)
- 使用excel快速生成sql语句
- 链表中环的入口结点-链表专题
- Dependencies tool to view exe and DLL dependencies
- 分布式事务
- Sword finger offer 17 Print from 1 to maximum n digits
- 《被讨厌的勇气:“自我启发之父”阿德勒的哲学课》
猜你喜欢

TCP粘包问题

医疗行业企业供应链系统解决方案:实现医疗数智化供应链协同可视

PHP uses queues to solve maze problems

Redis入门到精通01

【TiDB】TiCDC canal_json的实际应用

Cloud Native Landing Practice Using rainbond for extension dimension information

拓維信息使用 Rainbond 的雲原生落地實踐

电子元器件招标采购商城:优化传统采购业务,提速企业数字化升级

3.10 haas506 2.0开发教程-example-TFT

20220607跌破建议零售价,GPU市场正全面走向供过于求...
随机推荐
音频 librosa 库 与 torchaudio 库中 的 Mel- spectrogram 进行对比
hdfs上的数据导入到clickhouse用什么方式最快呢?spark通过jdbc导入,还是hdfs
Rust 操控大疆可编程无人机 tello
MySQL cannot find mysql Temporary solution of sock file
Rhai 脚本引擎的简单应用示例
详解单例模式
服务器之间传文件夹,文件夹内容为空
小程序容器技术,促进园区运营效率提升
torch stack() meshgrid()
depends工具查看exe和dll依赖关系
Dlib library for face key point detection (openCV Implementation)
Electronic components bidding and purchasing Mall: optimize traditional purchasing business and speed up enterprise digital upgrading
【TiDB】TiCDC canal_json的实际应用
[community star selection] the 23rd issue of the July revision plan | bit by bit creation, converging into a tower! Huawei freebuses 4E and other cool gifts
Coding officially entered Tencent conference application market!
Teach you to quickly set up a live studio in 30 minutes
MySQL事务并发问题和MVCC机制
AI首席架构师10-AICA-蓝翔 《飞桨框架设计与核心技术》
Multipass中文文档-设置图形界面
mysql for update 死锁问题排查