一、建立用戶:數據庫
create login username with password='密碼' , default_database=數據庫; create user username for login username with default_schema=dbo;
二、增刪改查受權spa
grant select,insert,UPDATE,DELETE on 表 to username
三、存儲過程受權code
GRANT EXECUTE ON 存儲過程名 TO username
四、禁止對錶受權blog
DENY UPDATE ON 表 TO username CASCADE;
五、回收權限it
REVOKE DELETE ON 表 FROM username