SQL Server 命令行创建用户及权限

USE [master]
GO
CREATE LOGIN [liups_loginame] WITH PASSWORD=N’liups88′, DEFAULT_DATABASE=[liups-dbname], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE [liups-dbname]
GO
CREATE USER [liups_loginame] FOR LOGIN [liups_loginame]
GO
USE [liups-dbname]
GO
ALTER ROLE [db_owner] ADD MEMBER [liups_loginame]
GO

USE [liups-dbname]
GO

DROP USER [liups_loginame]
GO

USE [master]
GO

DROP LOGIN [liups_loginame]
GO