Toad Startup script
Es Skript wo die wichtigschte Istellig im Toad bim Startup setzt und no es paar Infos usliest
--------------------------------------------------------------------------------
set feedback off
set heading off
set linesize 300
alter session set nls_date_format = 'YYYY-MON-DD HH24:MI:SS';
alter session set current_schema=k;
exec dbms_session.reset_package;
exec session#.open_session;
--------------------------------------------------------------------------------
-- Current AVQ Release
select ' RELEASE '||release r from (
select * from env_release_ins
where release not like '#%'
and release not like 'AFS%'
order by timestamp_ins desc)
where rownum = 1;
--------------------------------------------------------------------------------
-- Invalids
@@inv
set feedback off
set heading off
set linesize 300
--------------------------------------------------------------------------------
-- Current AVQ Release
select distinct ' TODAY '||today today from (
select * from base);
select distinct ' SESSION LEVEL '||session_level sl from (
select * from base);
--------------------------------------------------------------------------------
-- Show statistics about running BGPs
column bgp_id format a4
column bgp format a52
column valid_cnt format a4
column broken_cnt format a4
select '', trim(to_char(bgp_id, '000')) bgp_id
,get_obj(bgp_id) bgp
,count(case when valid = '+' then 1 end) valid_cnt
from k.obj_bgp_v
where 1=1
and bgp_id in (911, 925, 926, 928, 929, 930, 936, 992) -- restrict to "important" BGPs
group by bgp_id
order by bgp_id;
--------------------------------------------------------------------------------
-- Show statistics about current sessions
column osuser format a20
column username format a25
column program format a40
column cnt format a4
select '', upper(osuser) osuser, username, program, count(*) cnt
from v$session vs
where 1=1
and schemaname != 'SYS'
and type = 'USER'
and port != 0
group by upper(osuser), username, program
order by username, upper(osuser);
--------------------------------------------------------------------------------
set feedback on
set heading on