首页上一页 1 下一页尾页 1 条记录 1/1页
如何删除数据库用户
发表在数据库答疑区
2020-09-15
是否精华
是
否
版块置顶:
是
否
通过以下SQL创建的用户,如何删除
USE master
GO
CREATE LOGIN mr WITH PASSWORD = 'mrsoft' MUST_CHANGE,
CHECK_EXPIRATION = ON;
GO
GRANT VIEW SERVER STATE TO mr;
GO
CREATE TRIGGER connection_limit_trigger
ON ALL SERVER WITH EXECUTE AS 'mr'
FOR LOGON
AS
BEGIN
IF ORIGINAL_LOGIN()= 'mr' AND
(SELECT COUNT(*) FROM sys.dm_exec_sessions
WHERE is_user_process = 1 AND
original_login_name = 'mr') > 1
ROLLBACK;
END;