合 MSSQL使用命令创建登陆用户
Tags: MSSQLSQL Server创建用户
命令行创建
1 2 3 4 5 6 7 8 9 10 11 | USE [master] GO CREATE LOGIN [lhr] WITH PASSWORD=N'lhr', DEFAULT_DATABASE=[lhrdb], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO ALTER SERVER ROLE [sysadmin] ADD MEMBER [lhr] GO USE [lhrdb] GO CREATE USER [lhr] FOR LOGIN [lhr] GO |