	
DECLARE @temptable TABLE ( [account name] nvarchar(128), [type] varchar(8), [privilege] varchar(8), [mapped login name] nvarchar(128), [permission path] nvarchar(128) )
DECLARE @q NVARCHAR(4000)='';

INSERT INTO @temptable ([account name],
                        type,
                        privilege,
                        [mapped login name],
                        [permission path])
EXEC xp_logininfo 'centralinfra\ucilmlambt_adm','all';

SELECT TOP(1) @q = 'GRANT ALTER TRACE TO ['+[permission path]+'];'
FROM @temptable

PRINT @q;
PRINT REPLACE(@q,'GRANT', 'REVOKE');
