USE master; Go --Step 1: (create a new user) create LOGIN hello WITH PASSWord="foo", CHECK_POLICY = OFF; -- Step 2:(de
USE master;
Go
--Step 1: (create a new user)
create LOGIN hello WITH PASSWord="foo", CHECK_POLICY = OFF;
-- Step 2:(deny view to any database)
USE master;
GO
DENY VIEW ANY DATABASE TO hello;
-- step 3 (then authorized the user for that specific database , you have to use the master by doing use master as below)
USE master;
GO
ALTER AUTHORIZATioN ON DATABASE::yourDB TO hello;
GO
https://stackoverflow.com/questions/4085700/restrict-sql-server-login-access-to-only-one-database
--结束END--
本文标题: 数据库中,限制用户只能访问一个数据库
本文链接: https://www.lsjlt.com/news/5539.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0