Skip to content

Commit 1b33c52

Browse files
committed
Respect time zone delay for blocking thread
Record ASH for Con_ID=0 in Panorama-Sampler
1 parent 7882290 commit 1b33c52

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

app/controllers/active_session_history_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,8 @@ def list_ash_dependency_thread
10591059
JOIN DBA_Objects o ON o.Owner = p.Owner AND o.Object_Name = p.Object_Name AND o.Object_Type = p.Object_Type
10601060
),
10611061
#{ash_select(awr_filter: "DBID = ? AND Snap_ID BETWEEN ? AND ?
1062-
AND #{rounded_sample_time_sql(10)} = #{rounded_sample_time_sql(10, "TO_DATE(?, '#{sql_datetime_second_mask}')")} /* compare rounded to 10 seconds */",
1063-
sga_filter: "#{rounded_sample_time_sql(1)} = TO_DATE(?, '#{sql_datetime_second_mask}') /* auf eine Sekunde genau gerundete Zeit */",
1062+
AND #{rounded_sample_time_sql(10)}+#{client_tz_offset_days} = #{rounded_sample_time_sql(10, "TO_DATE(?, '#{sql_datetime_second_mask}')")} /* compare rounded to 10 seconds */",
1063+
sga_filter: "#{rounded_sample_time_sql(1)}+#{client_tz_offset_days} = TO_DATE(?, '#{sql_datetime_second_mask}') /* auf eine Sekunde genau gerundete Zeit */",
10641064
select_rounded_sample_time: true,
10651065
with_cte_alias: 'TSel'
10661066
)}

app/helpers/panorama_sampler/package_panorama_sampler_ash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def panorama_sampler_ash_code
280280
WHERE s.Status = 'ACTIVE'
281281
AND s.Wait_Class != 'Idle'
282282
AND s.SID != USERENV('SID') -- dont record the own session that assumes always active this way
283-
#{"AND s.Con_ID IN (SELECT /*+ NO_MERGE */ Con_ID FROM v$Containers) /* Consider sessions of Con-IDs to sample only */ " if PanoramaConnection.db_version >= '12.1'}
283+
#{"AND (s.Con_ID = 0 OR s.Con_ID IN (SELECT /*+ NO_MERGE */ Con_ID FROM v$Containers) /* Consider sessions of Con-IDs to sample only */ )" if PanoramaConnection.db_version >= '12.1'}
284284
ORDER BY s.SID -- sorted order needed for suppression of doublettes in next step
285285
;
286286

app/views/active_session_history/_list_ash_dependency_thread.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:Min_Snap_ID => @min_snap_id,
2323
:Max_Snap_ID => @max_snap_id,
2424
}
25-
retval << ajax_link("#{rec.instance_number}:#{rec.session_id}, #{rec.session_serial_no}",
25+
retval << ajax_link("#{rec.session_id}, #{rec.session_serial_no}",
2626
{:action => :list_session_statistic_historic_grouping,
2727
:groupfilter => groupfilter,
2828
:groupby => 'Session/Sn.',
@@ -45,7 +45,7 @@
4545
)
4646
end
4747

48-
retval
48+
retval.html_safe
4949
end
5050

5151
link_column_object = proc do |rec|

app/views/dba_sga/_list_sql_sga_stat.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def show_both_values(name, param, decimals, title="", show_per_result_row=false,
1818
execs = @sql.executions.to_i == 0 ? 1 : @sql.executions.to_i; # Suppress division by 0
1919

2020
if show_per_result_row && @sql.rows_processed.to_i > 0 # Suppress division by 0
21-
per_res_row = "\n\n#{formattedNumber(param/@sql.rows_processed.to_i, decimals+2)} per result row"
21+
per_res_row = "\n\n#{formattedNumber(param/@sql.rows_processed.to_i, decimals+3)} per result row"
2222
else
2323
per_res_row = ''
2424
end

app/views/env/_list_management_pack_license.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929

3030

31-
<div class="flex-row-element" title="<%= t(:env_list_management_pack_license_panorama_sampler_hint, :default=>"Panorama will use it's own sampled workload history produced by process \"Panorama-Sampler\".\nIt will not access Oracle's 'Diagnostic Pack' or 'Tuning Pack' if you choose this option.\nThis function \"Panorama-Sampler\" is usable for all database editions including Standard-Edition.\nYou can choose this option only if AWR/ASH-sampling for Panorama-Sampler is activated for your database instance.") %>">
31+
<div class="flex-row-element" title="<%= t(:env_list_management_pack_license_panorama_sampler_hint, :default=>"Panorama will use it's own sampled workload history produced by process \"Panorama-Sampler\".\nIt will not access Oracle's 'Diagnostic Pack' or 'Tuning Pack' if you choose this option.\nThis function \"Panorama-Sampler\" is usable for all database editions including Standard-Edition.\n\nYou can choose this option only if AWR/ASH-sampling for Panorama-Sampler is activated for your database instance\nand the first snapshot succeeded.") %>">
3232
<%= radio_button_tag(:management_pack_license, :panorama_sampler, get_current_database[:management_pack_license] == :panorama_sampler,
3333
:onclick=>"jQuery('#choose_managent_pack_submit').prop('disabled', false ); ajax_html('#{params[:update_area]}', 'env', 'set_management_pack_license', {management_pack_license: 'panorama_sampler', update_area: '#{params[:update_area]}'} );",
3434
:disabled => !PackLicense.management_pack_selectable(:panorama_sampler, @control_management_pack_access)

0 commit comments

Comments
 (0)