Friday, January 25, 2013

Oracle [ Size by Partitions ]

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 ,...

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