#!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect("dbi:ODBC:table","name","password") or die $DBI::errstr; my $sth_t = $dbh->table_info(); my @tables; while (my $table = ($sth_t->fetchrow())[2] ) { #Comment out next line if MSys* tables wanted #which might just be an Access thing anyhow next if $table =~ /^MSys/; push @tables,$table; } printf "%20s %20s %20s\n", 'TABLE','COLUMN NAME', 'COLUMN SIZE'; foreach my $table ( @tables ) { my $sth_c = $dbh->column_info( undef, undef, $table, undef ); while ( my ($table_name,$column_name, $column_size ) = ($sth_c->fetchrow())[2,3,6] ) { printf "%20s %20s %20s\n", $table_name, $column_name, $column_size; } } $dbh->disconnect();