A-9SQL Server 数据库安全
来源:互联网 发布:延安广电网络商务宾馆 编辑:程序博客网 时间:2024/06/07 02:29
SQL Server 数据库安全
--创建登陆用户--create login login_name from windows with default_database = database | default_language = language;create login [localhost\hoojo-pc] from windows with default_database = testHome;--创建登陆用户--create login login_name with password = 'pwd' [hashed] [must_change] [check_expiration] [check_policy]create login admin with password = '123456', default_database = testHome;--查看登陆用户select * from sys.sql_logins;--修改用户alter login admin with name = jackson;alter login jackson with password = 'abcd';--禁用、启用用户alter login jackson disable; --禁用alter login jackson enable; --启用--删除用户drop login jackson;--修改映射凭据(将登录名MacraeS 映射到凭据Custodian04)alter login jackson with credential = Custodian04;-------数据库用户--创建数据库用户create user jack from login admin;create user jason for login jackson;create user jack from login admin with default_schema = temp_schema;--启动guest用户(不推荐使用)--特殊用户dbo、guest;sa对应的dbo用户,其他没有映射的用户就是guest用户grant connect to guest;--修改用户alter user jack with name = jason;alter user jason with default_schema = jason_schema;--删除用户drop user jason;--------数据库角色--给jack用户授权buyers角色create role buyers authorIzation jack;--修改角色alter role buyers with name = new_buyers;--删除角色drop role new_buyers;--------架构管理--创建create schema temp_schema;--指定用户create schema jason_scheam authorization jason;--授权查询grant select to jason;--删除drop schema jason_scheam;--------权限--授权创建tablegrant create table to jason;--授权jason查询student表grant select on student to jason;--收回权限revoke create table to jason;revoke select on student to jason;
0 0
- A-9SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server 数据库安全
- SQL Server数据库安全列表
- SQL SERVER数据库安全加固
- SQL Server数据库安全设置
- SQL Server系列(9) -- 数据库的安全与备份
- 从IIS到SQL Server数据库安全
- SQL Server数据库安全规划全攻略
- HDOJ 1800 Flying to the Mars
- 兰顿蚂蚁
- iOS开发的一些技巧
- A-8SQL Server 触发器
- 我的博客
- A-9SQL Server 数据库安全
- Qt for Windows:Qt 5.4.0 MinGW 静态编译版本制作
- A-10SQL Server 开发指南
- SQL2014内存表性能之内存中 OLTP 的性能改进测试
- 自己珍藏的数据库SQL基础练习题答案
- 解决FindBLAS.cmake error LAPACK/BLAS: A required library with BLAS API not found.
- 把用某符号分隔的字符串转换成数组
- 短信猫smsLib for java二次开发系列问题解决探讨
- 数字图像处理学习笔记(1.2)---位图的读写、几何变换、傅里叶变换、直方图均衡