How do I know if an object is partitioned or not?
SELECT * FROM dba_tab_partitions WHERE table_name = '<table_name>';
SELECT * FROM dba_ind_partitions WHERE index_name = '<index_name>';
1 -Partitions = NO
select owner, segment_type, segment_name, bytes/1024/1024 mbytes
from dba_segments
where segment_name = 'TABLE_NAME';
2 - Partitions = YES
select seg.OWNER ,...
Friday, January 25, 2013
Wednesday, January 23, 2013
Perl with SQLServer -> =)
use DBI;
my $dsn = 'DBI:ODBC:Driver={SQL Server}';
my $host = 'WINSRV';
my $database = 'Relatorios';
my $user = 'sa';
my $auth = 'm1f1g1f4$';
my $dbh = DBI -> connect( "dbi:ODBC:driver={SQL Server};server={$host};Trusted Connection=yes, $user, $auth { PrintError => 0,RaiseError => 0,}") or die "\n\nthe mssql connection died with the following error: \n\n$DBI::errstr\n\n";
my $sth = $dbh->prepare('SELECT...
Monday, January 14, 2013
Command Line, linux, Mac, Unix
Perl Date Time [ yyyymmdd ]
#!/usr/bin/perl
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
my $yyyy_mm_dd = sprintf( "%4d%02d%02d", $year+1900,$mon+1,$mday );
print "$yyyy_mm_dd\n";
use POSIX;
my $DateTime = strftime "%F", localtime $^T;
$DateTime =~ s/-//g;
print "$DateTime";...