安全的SQL Server数据库 [英] Secure SQL server database

查看:81
本文介绍了安全的SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我在SQL Server方面的专业知识并不多。



我在WPF中创建了一个应用程序使用SQL作为后端数据库。我想用userid和密码保护数据库。因此,无论客户端是否使用Windows身份验证模式登录,数据库都只能通过该ID和密码访问。



请提示。



我尝试了什么:



我尝试创建用户登录,但是在Windows身份验证模式下仍然打开了数据库。

Hi
I am not so much expertise in SQL Server.

I had created an application in WPF that uses SQL as a backend database. I want to secure the database with a userid and password. So that the database can ONLY accessable by that id and password whether client login with windows authentication mode.

Kindly suggest.

What I have tried:

I tried by creating user for login but 5he database is still opened in windows authentication mode.

推荐答案

您需要更改用于Windows身份验证登录的用户的权限。

请按照以下步骤操作 -

1.找到用户进行Windows身份验证。登录时,您可以注意到模式,可能类似于UserName文本框中的 DomainName \UserName

2.然后从对象资源管理器,转到到安全 - >登录 - >您在上述步骤中找到的用户名

3.右键单击它并转到属性

4.选择< b>服务器角色

5.取消选中 sysadmin

6.现在,转到用户映射

7.检查要通过Windows身份验证访问的数据库,并取消选中列表中的所有其他数据库

8.选择要通过Windows访问的数据库列表中的身份验证

9.从第二个列表数据库角色成员身份:YouDBName检查Windows身份验证所需的角色

10尝试检查 db_datareader db_datawriter 角色





这就是全部,我想。

如果您还有问题,请告诉我。

谢谢
You need to change permissions of the user you are using for windows authentication login.
Follow these steps-
1. Find the user for windows authentication. You can notice the pattern, may be like DomainName\UserName in the UserName textbox while login.
2. Then from Object Explorer, go to Security --> Logins --> UserName that you found in the above step.
3. Right click on it and go to properties
4. Select Server Roles
5. Uncheck sysadmin
6. Now, go to User Mappings
7. Check the database that you want to be accessed by Windows Authentication and uncheck all others in the list
8. Select that database which you want to be accessed by windows authentication from the list
9. From the 2nd list "Database role membership for : YouDBName" check roles which are required for Windows Authentication
10. Try with checking db_datareader, db_datawriter roles


That's all, I think.
Please let me know if you still have issues.
Thanks


这篇关于安全的SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆