编写脚本-SQL SERVER 用户权限分配
USE [TXM];
GO
CREATE USER [WIN-JO\Administrator]
FOR LOGIN [WIN-JO\Administrator];
GO
EXEC sp_addrolemember N'db_owner', N'WIN-JO\Administrator';
GO
USE [WPP];
GO
CREATE USER [WIN-JO\Administrator]
FOR LOGIN [WIN-JO\Administrator];
GO
EXEC sp_addrolemember N'db_datareader', N'WIN-JO\Administrator';
GO
EXEC sp_addrolemember N'db_datawriter', N'WIN-JO\Administrator';
GO
EXEC sp_addrolemember N'db_owner', N'WIN-JO\Administrator';
GO
USE [master];
GO
ALTER LOGIN [WIN-JO\Administrator] ENABLE;
GO