查询最新修改的SP及远程登陆的用户,和断掉

select [name] from sys.all_objects where type = 'p' and modify_date  > '2007-11-6'
exec master.dbo.xp_cmdshell  'logoff id '
exec master.dbo.xp_cmdshell  'query user'
原文地址:https://www.cnblogs.com/ZhengGuoQing/p/1033281.html