为sql server手动创建用户
手动创建登录用户,并分配角色。
CREATE LOGIN mytest
WITH PASSWORD = '213212';
USE mytestDB;
CREATE USER mytest FOR LOGIN mytest
WITH DEFAULT_SCHEMA = dbo;
GO
exec sp_addrolemember 'db_owner','mytest'
手动创建登录用户,并分配角色。
CREATE LOGIN mytest
WITH PASSWORD = '213212';
USE mytestDB;
CREATE USER mytest FOR LOGIN mytest
WITH DEFAULT_SCHEMA = dbo;
GO
exec sp_addrolemember 'db_owner','mytest'