欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

数据库管理安全管理识别SQLServer中空密码或者弱密码的

程序员文章站 2024-01-02 23:12:10
...

--Creating a Login which has same password as its login name. Then creating a user with same name --and assigned it db_owner access. CREATE LOGIN mssqltips WITH PASSWORD = 'mssqltips' , CHECK_POLICY = OFF go use tempdb go CREATE USER mssql

--Creating a Login which has same password as its login name. Then creating a user with same name

--and assigned it db_owner access.

CREATE LOGINmssqltips WITH PASSWORD='mssqltips'

, CHECK_POLICY=OFF

go

use tempdb

go

CREATE USER mssqltips forlogin mssqltips

go

sp_addrolemember'db_owner',mssqltips

go

--Creating a Login without password. Then creating a user with same name and assigned it db_owner access.

CREATE LOGINmssqltips_1 WITH PASSWORD=''

, CHECK_POLICY=OFF

go

use tempdb

go

CREATE USER mssqltips_1 for login mssqltips_1

go

sp_addrolemember'db_owner',mssqltips_1

go

上一篇:

下一篇: