Sqlserver 创建查询添加删除账号
下面是通过脚本创建账号,创建一个sqluser 的账号,密码:123456,可操作的DB:TEST
赋予权限,增删改查,操作视图,存储过程。当然当前的账号要有足够的权限。
create login sqluser with password='123456', default_database=[TEST]
use TEST
GO
create user sqluser for login sqluser with default_schema=dbo;
GRANT VIEW DEFINITION ON SCHEMA :: dbo to [sqluser]
GRANT EXEC ON SCHEMA :: dbo TO [sqluser]
GRANT SELECT ON SCHEMA :: dbo TO [sqluser]
GRANT UPDATE ON SCHEMA :: dbo TO [sqluser]
GRANT INSERT ON SCHEMA :: dbo TO [sqluser]
GRANT DELETE ON SCHEMA :: dbo TO [sqluser]
GRANT ALTER ON SCHEMA :: dbo TO [sqluser]
GO
分类: Sq