amachanic / sp_whoisactive

sp_whoisactive
GNU General Public License v3.0
1.13k stars 281 forks source link

Initial addition of encrypt_option column. #80

Closed dalehhirt closed 1 year ago

dalehhirt commented 2 years ago

This adds an encrypt_option column.

However, I am getting the following error when I run "EXEC sp_WhoIsActive @show_sleeping_spids=2".

Msg 207, Level 16, State 1, Line 216 Invalid column name 'encrypt_option'.

I'm submitting the pull request as a starting point.

-- should not show the encrypt_option column, nor will it sort
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@output_column_list='[session_id][program_name][encrypt_option]'
    ,@sort_order='[encrypt_option] DESC'

-- Will show encrypt_option column
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@get_encrypt_info=1

-- Will show encrypt_option column
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@get_encrypt_info=1
    ,@output_column_list='[session_id][program_name][encrypt_option]'

-- Will show encrypt_option column and sort by encrypt_option
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@get_encrypt_info=1
    ,@output_column_list='[session_id][program_name][encrypt_option]'
    ,@sort_order='[encrypt_option] DESC'

-- Will filter for only encrypt_option=true
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@filter='true'
    ,@filter_type='encrypted'

-- Will filter for not encrypt_option=true
EXEC sp_WhoIsActive @show_sleeping_spids=2
    ,@not_filter='true'
    ,@not_filter_type='encrypted'

Feature request #79

dalehhirt commented 2 years ago

I believe I resolved the above issue.

dalehhirt commented 2 years ago

encrypt_option column is no longer a default column. It now needs to be enabled with the @get_encrypt_info=1 parameter.

dalehhirt commented 1 year ago

Moving to using the additional_info column as @amachanic suggested. Abandoning this PR.