时间:2021-07-01 10:21:17 帮助过:15人阅读
--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