DBD-Oracle
view release on metacpan or search on metacpan
examples/ora_explain.pl view on Meta::CPAN
return(1);
}
# Build the popup menu
$qry = $Db->prepare(qq(
$SqlMarker select owner, index_name from all_indexes
where table_name = :1 and table_owner = :2
));
$qry->execute($row->{OBJECT_NAME}, $row->{OBJECT_OWNER})
|| die("Table indexes:\n$DBI::errstr\n");
my $menu = $PlanMain->Menu(-tearoff => 0, -disabledforeground => "#000000");
$menu->command(-label => "Indexes", -state => "disabled");
$menu->separator();
my $count = 0;
while ((my ($index_owner, $index_name) = $qry->fetchrow_array()))
{
$menu->command(-label => "$index_owner.$index_name",
-command => [ \&disp_index, $index_owner, $index_name ]);
$count++;
}
examples/ora_explain.pl view on Meta::CPAN
$sort_by = "desc" if ($sort_by eq "");
foreach my $bn (values(%ord_bn))
{ $bn->configure(-state => "normal"); }
$ord_bn{executions}->configure(-state => "disabled");
$ord_bn{first_load_time}->configure(-state => "disabled");
foreach my $bn (values(%sort_bn))
{ $bn->configure(-state => "normal"); }
}
};
### Menubar
my $menubar = $GrabMain->Frame(-relief => "raised", -borderwidth => 3);
$menubar->pack(-fill => "x");
my $menubar_file = $menubar->Menubutton(-text => "File", -underline => 0);
$menubar_file->command(-label => "Save File ...", -underline => 0,
-command => sub { save_dialog($PlanMain, $GrabSql); });
$menubar_file->separator();
$menubar_file->command(-label => "Capture SQL", -underline => 0,
-command => $grab_cb);
$menubar_file->command(-label => "Copy to Explain", -underline => 9,
-command => sub { copy_sql($GrabSql, $GrabSelection); });
$menubar_file->command(-label => "Close", -underline => 1,
-command => sub { $GrabMain->withdraw(); });
$menubar_file->pack(-side => "left");
my $menubar_help = $menubar->Menubutton(-text => "Help", -underline => 0);
$menubar_help->command(-label => "About ...", -underline => 0,
-command => sub { about($GrabMain); });
$menubar_help->command(-label => "Usage ...", -underline => 0,
-command => sub { help($GrabMain); });
$menubar_help->pack(-side => "right");
### SQL cache display
my ($frame, $frame1, $frame2, $frame3);
$frame = $GrabMain->Frame(-borderwidth => 3, -relief => "raised");
$frame1 = $frame->Frame(-highlightthickness => 0);
examples/ora_explain.pl view on Meta::CPAN
if (@ARGV == 0 || $ARGV[0] ne '-q')
{
about($PlanMain, \$splash);
$splash->after(10000,
sub { if ($splash) { $splash->destroy(); undef($splash); } });
$PlanMain->update();
}
else
{ shift(@ARGV); }
### Menubar
my $menubar = $PlanMain->Frame(-relief => "raised", -borderwidth => 3);
# Create a bold font $ figure out charcter spacing
my $t = $PlanMain->Text();
my $f = $t->cget(-font);
$t->fontCreate("bold", $PlanMain->fontActual($f), -weight => "bold");
$CharWidth = $PlanMain->fontMeasure($f, "X");
undef($f);
$t->destroy();
undef($t);
my $menubar_file = $menubar->Menubutton(-text => "File", -underline => 0);
$menubar_file->command(-label => "Login ...", -underline => 0,
-command => sub { login_dialog($PlanMain); });
$menubar_file->command(-label => "Schema ...", -underline => 2,
-command => sub { schema_dialog($PlanMain); });
$menubar_file->command(-label => "Explain", -underline => 0,
-command => \&explain);
$menubar_file->command(-label => "SQL Cache ...", -underline => 4,
-command => \&grab_main);
$menubar_file->separator();
$menubar_file->command(-label => "Open File ...", -underline => 0,
-command => sub { open_dialog($PlanMain); });
$menubar_file->command(-label => "Save File ...", -underline => 0,
-command => sub { save_dialog($PlanMain, $PlanSql); });
$menubar_file->separator();
$menubar_file->command(-label => "Exit", -underline => 1,
-command => sub { $Db->disconnect() if ($Db); exit(0); });
$menubar_file->pack(-side => "left");
my $menubar_help = $menubar->Menubutton(-text => "Help", -underline => 0);
$menubar_help->command(-label => "About ...", -underline => 0,
-command => sub { about($PlanMain); });
$menubar_help->command(-label => "Usage ...", -underline => 0,
-command => sub { help($PlanMain); });
$menubar_help->pack(-side => "right");
$menubar->pack(-fill => "x");
### Query plan tree
my $frame;
$frame = $PlanMain->Frame(-borderwidth => 3, -relief => "raised");
lib/DBD/Oracle/Troubleshooting/Win64.pod view on Meta::CPAN
version 11.2.0.1.0 for 64bit windows of Oracle's
<a href='http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winx64soft.html'>Instant Client Package - Basic</a>
along with the Instant Client Package - SQL*Plus and finally the Instant Client Package - SDK.
To get it to Make and compile correctly I had to download Microsoft's <a href='http://www.microsoft.com/visualstudio/en-ca/download'>Visual Studio Ultimate</a>
which should contain all the files you need. It is rather portly at 2+gb so you might want to grab lunch while you are downloading it.
After all the above downloading DBB::Oracle installed right out of the box.
All one has to do is select 'Start Menu->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio x64 Win64 Command Prompt (2010)'
which will open a good old 'dos' window.
At this point CD to the directory where you downloaded DBD::Oracle
c:\DBD-Oracle>
then set your 'ORACLE_HOME to the Instant Client directory
c:\DBD-Oracle>set ORACLE_HOME=c:\IC_11
( run in 1.028 second using v1.01-cache-2.11-cpan-49f99fa48dc )