view release on metacpan or search on metacpan
orac_Base.pm view on Meta::CPAN
-width=>60,
-wrap=>'none',
-cursor=>undef,
-foreground=>$main::fc,
-background=>$main::bc);
$t->pack(-expand=>1,-fil=>'both');
tie (*THIS_TEXT,'Tk::Text',$t);
print THIS_TEXT "$_[1]\n";
$d->Show;
$_[0]->Unbusy;
}
sub about_orac {
my $self = shift;
# Slap up the various files onto the
# main TEXT widget
my $print_out = $self->gf_str( $_[0] );
$self->{Text_var}->insert('end', $print_out);
orac_Oracle.pm view on Meta::CPAN
if ($uf_type eq 'index'){
$uf_txt = 'Build Index';
} else {
$uf_txt = $main::lg{sel_info};
}
$bb->Button( -text=>$uf_txt,
-command=>sub{ $bd->Busy;
$self->selector($bd,$uf_type);
$bd->Unbusy}
)->pack (-side=>'right',
-anchor=>'e');
$bd->Show;
}
sub selector {
my $self = shift;
orac_Oracle.pm view on Meta::CPAN
-expand=>'no');
main::iconize($main::swc{errors_orac});
}
$main::swc{errors_orac}->{text}->insert('end', @res);
}
$sth->finish;
if($detected == 0){
$self->{Main_window}->Busy;
main::mes($self->{Main_window},$main::lg{no_rows_found});
$self->{Main_window}->Unbusy;
} else {
$main::sub_win_but_hand{errors_orac}->configure(-state=>'disabled');
$main::swc{errors_orac}->{text}->pack();
$main::swc{errors_orac}->{text}->bind(
'<Double-1>',
sub{ $main::swc{errors_orac}->Busy;
$self->selected_error(
$main::swc{errors_orac}->{text}->get('active')
);
$main::swc{errors_orac}->Unbusy}
);
}
}
sub dbas_orac {
my $self = shift;
# Creates DBA Viewer window
my $cm = $self->f_str('dbas_orac','1');
my $sth = $self->{Database_conn}->prepare( $cm ) ||
orac_Oracle.pm view on Meta::CPAN
);
main::iconize($main::swc{dbas_orac});
}
$main::swc{dbas_orac}->{text}->insert('end', @res);
}
$sth->finish;
if($detected == 0){
$self->{Main_window}->Busy;
main::mes($self->{Main_window},$main::lg{no_rows_found});
$self->{Main_window}->Unbusy;
} else {
$main::sub_win_but_hand{dbas_orac}->configure(-state=>'disabled');
$main::swc{dbas_orac}->{text}->pack();
$main::swc{dbas_orac}->{text}->bind(
'<Double-1>',
sub{
print STDERR "dbas_orac: 0\n" if ($main::debug > 0);
$main::swc{dbas_orac}->Busy;
print STDERR "dbas_orac: 1\n" if ($main::debug > 0);
$self->{Main_window}->Busy;
print STDERR "dbas_orac: 2\n" if ($main::debug > 0);
$self->univ_form( $self->{Main_window},
'SYS',
$main::swc{dbas_orac}->{text}->get('active'),
'form'
);
print STDERR "dbas_orac: 3\n" if ($main::debug > 0);
$self->{Main_window}->Unbusy;
print STDERR "dbas_orac: 4\n" if ($main::debug > 0);
$main::swc{dbas_orac}->Unbusy;
print STDERR "dbas_orac: 5\n" if ($main::debug > 0);
}
);
}
}
sub addr_orac {
print STDERR "in addr_orac:\n" if ($main::debug > 0);
orac_Oracle.pm view on Meta::CPAN
main::iconize($main::swc{addr_orac});
}
$main::swc{addr_orac}->{text}->insert('end', @res);
}
$sth->finish;
if($detected == 0){
$self->{Main_window}->Busy;
main::mes($self->{Main_window},$main::lg{no_rows_found});
$self->{Main_window}->Unbusy;
} else {
$main::sub_win_but_hand{addr_orac}->configure(-state=>'disabled');
$main::swc{addr_orac}->{text}->pack();
$main::swc{addr_orac}->{text}->bind(
'<Double-1>',
sub{
print STDERR "addr_orac: a1\n" if ($main::debug > 0);
orac_Oracle.pm view on Meta::CPAN
);
main::iconize($main::swc{sids_orac});
}
$main::swc{sids_orac}->{text}->insert('end', @res);
}
$sth->finish;
if($detected == 0){
$self->{Main_window}->Busy;
main::mes($self->{Main_window},$main::lg{no_rows_found});
$self->{Main_window}->Unbusy;
} else {
$main::sub_win_but_hand{sids_orac}->configure(-state=>'disabled');
$main::swc{sids_orac}->{text}->pack();
$main::swc{sids_orac}->{text}->bind(
'<Double-1>',
sub { $main::swc{sids_orac}->Busy;
$self->f_clr( $main::v_clr );
my $cm = $self->f_str( 'sel_sid' , '1' );
my $sid_param = $main::swc{sids_orac}->{text}->get('active');
$self->show_sql( $cm ,
$main::lg{sel_sid} . ': ' . $sid_param,
$sid_param );
$main::swc{sids_orac}->Unbusy}
);
}
}
sub gh_roll_name {
my $self = shift;
my $cm = $self->f_str('time','2');
my $sth = $self->{Database_conn}->prepare($cm) ||
die $self->{Database_conn}->errstr;
$sth->execute;
orac_Oracle.pm view on Meta::CPAN
-command=>sub{ $self->explain_it() }
)->pack(side=>'left');
$dmb->Button( -text=>$main::lg{clear},
-command=>sub{
$main::swc{explain_plan}->Busy;
$w_explain[2]->delete('1.0','end');
$w_holders[0] = $main::v_sys;
$w_holders[1] = $main::lg{explain_help};
$expl_butt->configure(-state=>'normal');
$main::swc{explain_plan}->Unbusy;
}
)->pack(side=>'left');
}
$dmb->Button(
-text=>$main::lg{exit},
-command=> sub{
$main::swc{explain_plan}->withdraw();
orac_Oracle.pm view on Meta::CPAN
print STDERR "who_hold: v_username>$v_username[1]<\n"
if ($main::debug > 0);
print STDERR "who_hold: v_sid >$v_sid[1]<\n"
if ($main::debug > 0);
$self->who_what( 1,
$v_osuser[1],
$v_username[1],
$v_sid[1]
);
$self->{Main_window}->Unbusy
}
);
$self->{Text_var}->insert('end', "\n");
}
# And finally, thank goodness, the actual report.
$self->show_sql( $cm , $main::lg{who_hold} );
}
orac_Oracle.pm view on Meta::CPAN
'<Double-1>',
sub{ $self->{Main_window}->Busy;
my @stat_str = split('\:', $scroll_box->get('active') );
print STDERR "mts_mem: stat_str>@stat_str<\n"
if ($main::debug > 0);
$self->who_what( 2,
$stat_str[1]
);
$self->{Main_window}->Unbusy
}
);
$self->{Text_var}->insert('end', "\n");
}
$self->show_sql( $cm , $main::lg{mts_mem} );
}
sub do_a_generic {
orac_Oracle.pm view on Meta::CPAN
sub{$d->Busy;
print STDERR "\ndo_a_gen form: d >$d<\n" if ($main::debug > 0);
print STDERR "do_a_gen form: owner >$owner<\n" if ($main::debug > 0);
print STDERR "do_a_gen form: generic>$generic<\n\n" if ($main::debug > 0);
$self->univ_form($d,
$owner,
$generic,
'form');
$d->Unbusy }
);
$l_txt->window('create', 'end',-window=>$b[$i]);
$i++;
print L_TEXT " ";
$b[$i] =
$l_txt->Button(
-text=>$main::lg{build_index},
-command=> sub{$d->Busy;
print STDERR "\ndo_a_gen inx: d >$d<\n" if ($main::debug > 0);
print STDERR "do_a_gen inx: owner >$owner<\n" if ($main::debug > 0);
print STDERR "do_a_gen inx: generic >$generic<\n\n" if ($main::debug > 0);
$self->univ_form($d,$owner,$generic,'index');
$d->Unbusy }
);
$l_txt->window('create','end',-window=>$b[$i]);
}
} elsif ($l_hlst eq $main::lg{views}){
print L_TEXT "\n\n ";
$b[1] =
$l_txt->Button(
-text=>$main::lg{form},
orac_Oracle.pm view on Meta::CPAN
print STDERR "do_a_gen vform: d >$d<\n" if ($main::debug > 0);
print STDERR "do_a_gen vform: owner >$owner<\n" if ($main::debug > 0);
print STDERR "do_a_gen vform: generic >$generic<\n" if ($main::debug > 0);
$self->univ_form( $d,
$owner,
$generic,
'form'
);
$d->Unbusy }
);
$l_txt->window('create', 'end',-window=>$b[1]);
}
print L_TEXT "\n\n";
$d->Show;
$l_mw->Unbusy;
}
1;
orac_QuickSQL.pm view on Meta::CPAN
$dmb->Button( -text=>$main::lg{execute_sql},
-command=>sub{ orac_QuickSQL::execute_sql() }
)->pack(side=>'left');
$dmb->Button(-text=>$main::lg{clear},
-command=>sub{
$main::swc{quick_sql}->Busy;
$quick_sql_txt->delete('1.0','end');
$main::swc{quick_sql}->Unbusy;
}
)->pack(side=>'left');
$dmb->Button(
-text=>$main::lg{exit},
-command=> sub{
$main::swc{quick_sql}->withdraw();
orac_Shell.pm view on Meta::CPAN
my $class = DBI::Format->formatter($opt_dis_grid);
my $r = $class->new($self);
$r->header($sth, \*RSLT_TXT, ",");
my $row;
while( $row = $sth->fetchrow_arrayref() ) {
$r->row($row, \*RSLT_TXT, "," );
}
$r->trailer(\*RSLT_TXT);
$sth->finish;
$dbiwd->Unbusy;
}
1;
orac_dba.pl view on Meta::CPAN
# or the user has changed the database type
main::del_Jareds_tools();
main::config_menu();
main::Jareds_tools();
$main::orac_orig_db = $main::orac_curr_db_typ;
}
}
sub bz {
# Make the main GUI pointer go busy
$main::mw->Busy;
}
sub ubz {
# Make the main GUI pointer normalise to unbusy
$main::mw->Unbusy;
}
sub get_Jared_sql {
# Takes pointers to which cascade and button the user
# wishes to run, and sucks SQL info out of the appropriate
# file, before returning as a Perl string variable
my($casc,$butt) = @_;
my $filename = 'tools/sql/' . $casc . '.' . $butt . '.sql';
my $cm = '';
sql/Oracle/dispatch_stuff.1.sql view on Meta::CPAN
select Network,
round((SUM(busy) / (SUM(busy) + SUM(idle))),20) "Busy_Rate"
from v$dispatcher
GROUP by network
sql/Oracle/gh_summ_sess.1.sql view on Meta::CPAN
select 'log file space/switch',sum(time_waited)/100
from v$system_event
where event like 'log file space/switch'
union
select 'latch waits',sum(time_waited)/100
from v$system_event
where event like 'latch free'
union
select 'Buffer waits',sum(time_waited)/100
from v$system_event
where event in ('write complete waits','free buffer waits','buffer busy waits')
union
select 'SQL*Net waits (inc remote SQL)',sum(time_waited)/100
from v$system_event
where event like 'SQL*Net%'
and event !='SQL*Net message from client'
union
select 'lock waits',sum(time_waited)/100
from v$system_event
where event = 'enqueue'
union
sql/Oracle/gh_summ_sess.1.sql view on Meta::CPAN
union
select 'Other waits (non-idle)',sum(time_waited)/100
from v$system_event
where event not in ('Null event','client message','smon timer',
'rdbms ipc message','pmon timer','WMON goes to sleep',
'virtual circuit status','dispatcher timer',
'SQL*Net message from client',
'parallel query dequeue wait','latch free',
'enqueue','write complete waits',
'free buffer waits',
'buffer busy waits','pipe gets',
'Null event','client message','smon timer',
'rdbms ipc message','pmon timer','WMON goes to sleep',
'virtual circuit status','dispatcher timer',
'SQL*Net message from client',
'parallel query dequeue wait','latch free',
'enqueue','write complete waits',
'free buffer waits',
'buffer busy waits','pipe gets','slave wait','PL/SQL lock timer',
'null event','Null event','rdbms ipc reply',
'Parallel Query Idle Wait - Slaves',
'KXFX: Execution Message Dequeue - Slave','slave wait')
and event not like 'db file%'
and event not like 'log file%'
and event not like 'SQL*Net%'
order by 1
txt/Oracle/tune_wait.1.txt view on Meta::CPAN
Notes:
----------------------------------------------------------------
1. Not all waits are shown.
2. Buffer busy waits may be caused by free list contention
. for specific tables (create more free lists if neccesary)
. or by insufficient rollback segments or extents
3. Free buffer waits may be caused by excessive disk sorts
4. Enqueue waits may indicate contention for table or row
. locks (do you have foreign keys defined without indexes?)
5. Examine v$latch (or run latch_sta.sql) if latch waits are
. significant