alex2
1/10/2019 - 6:31 AM

Get transactions without admin right

declare @OpenTranStatus as table (
    ActiveTransaction varchar(25),
    Details sql_variant
)

-- Execute the command, putting the results in the table
insert into @OpenTranStatus
exec ('dbcc opentran() with tableresults, no_infomsgs')

select * from @OpenTranStatus