当前位置:网站首页>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.
边栏推荐
- 4个技巧告诉你,如何使用SMS促进业务销售?
- LeetCode动态规划经典题(一)
- hdfs上的数据导入到clickhouse用什么方式最快呢?spark通过jdbc导入,还是hdfs
- 深度学习编译器的理解
- 「经验」我对用户增长的理解『新用户篇』
- Personally test the size of flutter after packaging APK, quite satisfied
- dtd建模
- Small program container technology to promote the operation efficiency of the park
- At present, the big guys are joining the two streams of flinksql, cdcmysql and Kafka, and the results are put into MySQL or KA
- 屏幕显示技术进化史
猜你喜欢

联想YOGA 27 2022,超强配置全面升级

countdownlatch 和 completableFuture 和 CyclicBarrier

Digital intelligent supplier management system solution for coal industry: data driven, supplier intelligent platform helps enterprises reduce costs and increase efficiency

3.10 haas506 2.0 development tutorial example TFT

Vulnerability recurrence ----- 35. Uwsgi PHP directory traversal vulnerability (cve-2018-7490)

How to use AI technology to optimize the independent station customer service system? Listen to the experts!

Dlib库实现人脸关键点检测(Opencv实现)

MySQL事务并发问题和MVCC机制

PyTorch学习(三)

拓维信息使用 Rainbond 的云原生落地实践
随机推荐
Distributed transaction
PyTorch学习(三)
The easynvr platform equipment channels are all online. What is the reason for the "network request failure" in the operation?
SaaS project management system solution for the financial service industry helps enterprises tap a broader growth service space
What if icloud photos cannot be uploaded or synchronized?
删除排序链表中的重复元素 II[链表节点统一操作--dummyHead]
教你30分钟快速搭建直播间
Tensorflow2 深度学习十必知
【TiDB】TiCDC canal_ Practical application of JSON
ForkJoinPool
mysql for update 死锁问题排查
Is it safe to open a mobile stock account? Is it reliable?
dtd建模
Tensorflow2 ten must know for deep learning
深度学习编译器的理解
Dlib library for face key point detection (openCV Implementation)
Rust 操控大疆可编程无人机 tello
PC端微信多开
php利用队列解决迷宫问题
领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!