CREATE OR REPLACE PROCEDURE resource_output AS
BEGIN
dbms_output.enable(100000);
FOR rl IN (
select * from v$resource_limit
)
LOOP
DBMS_OUTPUT.PUT_LINE('Resource Name = ' || rl.resource_name ||
', Current Utilization = ' || rl.current_utilization ||
', Max Utilization = ' || rl.max_utilization ||
', Initial Allocation = ' || rl.initial_allocation ||
', Limit Value = ' || rl.limit_value);
END LOOP;
END resource_output;
exec resource_output;
輸出:
Resource Name = processes, Current Utilization = 103, Max Utilization = 179, Initial Allocation = 900, Limit Value = 900
Resource Name = sessions, Current Utilization = 117, Max Utilization = 212, Initial Allocation = 1372, Limit Value = 1372
Resource Name = enqueue_locks, Current Utilization = 105, Max Utilization = 223, Initial Allocation = 15820, Limit Value = 15820
Resource Name = enqueue_resources, Current Utilization = 35, Max Utilization = 94, Initial Allocation = 6256, Limit Value = UNLIMITED
Resource Name = ges_procs, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = 0
Resource Name = ges_ress, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = ges_locks, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = ges_cache_ress, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = ges_reg_msgs, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = ges_big_msgs, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = ges_rsv_msgs, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = 0
Resource Name = gcs_resources, Current Utilization = 0, Max Utilization = 0, Initial Allocation = UNLIMITED, Limit Value = UNLIMITED
Resource Name = gcs_shadows, Current Utilization = 0, Max Utilization = 0, Initial Allocation = UNLIMITED, Limit Value = UNLIMITED
Resource Name = smartio_overhead_memory, Current Utilization = 0, Max Utilization = 68632, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = smartio_buffer_memory, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = smartio_metadata_memory, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = smartio_sessions, Current Utilization = 0, Max Utilization = 1, Initial Allocation = 0, Limit Value = UNLIMITED
Resource Name = dml_locks, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 6036, Limit Value = UNLIMITED
Resource Name = temporary_table_locks, Current Utilization = 0, Max Utilization = 65, Initial Allocation = UNLIMITED, Limit Value = UNLIMITED
Resource Name = transactions, Current Utilization = 5, Max Utilization = 5, Initial Allocation = 1509, Limit Value = UNLIMITED
Resource Name = branches, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 1509, Limit Value = UNLIMITED
Resource Name = cmtcallbk, Current Utilization = 3, Max Utilization = 19, Initial Allocation = 1509, Limit Value = UNLIMITED
Resource Name = max_rollback_segments, Current Utilization = 14, Max Utilization = 21, Initial Allocation = 1509, Limit Value = 65535
Resource Name = sort_segment_locks, Current Utilization = 16, Max Utilization = 40, Initial Allocation = UNLIMITED, Limit Value = UNLIMITED
Resource Name = k2q_locks, Current Utilization = 0, Max Utilization = 0, Initial Allocation = 2744, Limit Value = UNLIMITED
Resource Name = max_shared_servers, Current Utilization = 0, Max Utilization = 0, Initial Allocation = UNLIMITED, Limit Value = UNLIMITED
Resource Name = parallel_max_servers, Current Utilization = 0, Max Utilization = 16, Initial Allocation = 40, Limit Value = 3600
爲什麼要在PL/SQL代碼中執行此操作? – mathguy