当前位置:网站首页>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.
边栏推荐
- 基于STM32F1的环境光与微距离检测系统
- The online procurement system of the electronic components industry accurately matches the procurement demand and leverages the digital development of the electronic industry
- 【TiDB】TiCDC canal_json的实际应用
- Troubleshooting MySQL for update deadlock
- 3.10 haas506 2.0 development tutorial example TFT
- Multipass中文文档-设置图形界面
- Is it safe to open an account for goucai? Is it reliable?
- Personally test the size of flutter after packaging APK, quite satisfied
- EasyNVR平台设备通道均在线,操作出现“网络请求失败”是什么原因?
- hdfs上的数据导入到clickhouse用什么方式最快呢?spark通过jdbc导入,还是hdfs
猜你喜欢

Cloud Native Landing Practice Using rainbond for extension dimension information

充值满赠,IM+RTC+X 全通信服务「回馈季」开启

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

金融服务行业SaaS项目管理系统解决方案,助力企业挖掘更广阔的增长服务空间

全栈代码测试覆盖率及用例发现系统的建设和实践

OneFlow源码解析:算子签名的自动推断

SaaS project management system solution for the financial service industry helps enterprises tap a broader growth service space

华兴证券:混合云原生架构下的 Kitex 实践

Swin-Transformer(2021-08)

Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills
随机推荐
领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!
Entry node of link in linked list - linked list topic
What if icloud photos cannot be uploaded or synchronized?
Vulnerability recurrence ----- 35. Uwsgi PHP directory traversal vulnerability (cve-2018-7490)
MySQL n'a pas pu trouver MySQL. Solution temporaire pour le fichier Sock
Sword finger offer 16 Integer power of numeric value
depends工具查看exe和dll依赖关系
dtd建模
金融服务行业SaaS项目管理系统解决方案,助力企业挖掘更广阔的增长服务空间
Rust 操控大疆可编程无人机 tello
电子元器件招标采购商城:优化传统采购业务,提速企业数字化升级
TiDB Dashboard里面可以写sql执行吗
PHP uses queues to solve maze problems
Is it safe to open an account for goucai? Is it reliable?
联想YOGA 27 2022,超强配置全面升级
Digital intelligent supplier management system solution for coal industry: data driven, supplier intelligent platform helps enterprises reduce costs and increase efficiency
【TiDB】TiCDC canal_json的实际应用
Tide - 基于 async-std 的 Rust-web 框架
How to do a good job in software system demand research? Seven weapons make it easy for you to do it
挖财账号开户安全吗?是靠谱的吗?