$sth = $dbh->prepare('show table"EP_TGT"."NA_DATA_CNTL";'); $sth->execute; while (my $text = $sth->fetchrow_array) { # a piece of code not relevant to the question } #### SQLPrepare show table"EP_TGT"."NA_DATA_CNTL"; SQLPrepare = 0 <- prepare= ( DBI::st=HASH(0x4c04dc8) ) [1 items] at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 219 via at C:/Strawberry/perl/vendor/lib/Try/Tiny.pm line 102 >> execute DISPATCH (DBI::st=HASH(0x4c04dc8) rc2/1 @1 g2 ima1041 pid#5724) at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 220 via at C:/Strawberry/perl/vendor/lib/Try/Tiny.pm line 102 -> execute for DBD::ODBC::st (DBI::st=HASH(0x4c04dc8)~0x4c04ca8) thr#d17d58 +dbd_st_execute_iv(4c04bd0) dbd_st_finish(4c04bd0) outparams = 0 SQLExecute/SQLExecDirect(4c92090)=0 SQLRowCount=0 (rows=1) SQLNumResultCols=0 (flds=1) dbd_describe done_desc=0 dbd_describe SQLNumResultCols=0 (columns=1) DescribeCol column = 1, name = R, namelen = 12, type = UNICODE VARCHAR(-9), precision/column size = 21333, scale = 0, nullable = 1 SQL_COLUMN_DISPLAY_SIZE = 21333 SQL_COLUMN_LENGTH = 21333 now using col 1: type = UNICODE VARCHAR (-9), len = 42668, display size = 42668, prec = 21333, scale = 0 -dbd_describe done_bind=0 have 1 fields -dbd_st_execute_iv(4c04bd0)=1 <- execute= ( 1 ) [1 items] at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 220 via at C:/Strawberry/perl/vendor/lib/Try/Tiny.pm line 102 >> fetchrow_array DISPATCH (DBI::st=HASH(0x4c04dc8) rc1/1 @1 g2 ima0 pid#5724) at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 via at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 176 -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x4c04dc8)~0x4c04ca8) thr#d17d58 bind_columns fbh=45833c8 fields=1 Bind 1: type = UNICODE CHAR(-8), buf=4d18058, buflen=42668 bind_columns=0 SQLFetch=1 dbih_setup_fbav alloc for 1 fields dbih_setup_fbav now 1 fields fetch num_fields=1 fetch col#1 R datalen=46496 displ=42668 !!dbd_error2(err_rc=-999, what=st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small), handles=(4c8c6e0,4ce13e0,4c92090) !SQLError(4c8c6e0,4ce13e0,4c92090) = (HY000, 1, st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small)) -- HandleSetErr err=1, errstr='st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) (SQL-HY000)', state='HY000', undef !SQLError(4c8c6e0,4ce13e0,4c92090) = (01004, 10160, [Teradata][ODBC] (10160) Output string data right truncation: string data is too big for the output data buffer and has been truncated.) -- HandleSetErr err=1, errstr='[Teradata][ODBC] (10160) Output string data right truncation: string data is too big for the output data buffer and has been truncated. (SQL-01004)', state='01004', undef !! ERROR: 1 'st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) (SQL-HY000) [state was HY000 now 01004] [Teradata][ODBC] (10160) Output string data right truncation: string data is too big for the output data buffer and has been truncated. (SQL-01004)' (err#2) <- fetchrow_array= ( undef ) [1 items] row1 at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 via at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 176 >> DESTROY DISPATCH (DBI::st=HASH(0x4c04dc8) rc1/1 @1 g2 ima10004 pid#5724) at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 via at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 <> DESTROY(DBI::st=HASH(0x4c04dc8)) ignored for outer handle (inner DBI::st=HASH(0x4c04ca8) has ref cnt 1) >> DESTROY DISPATCH (DBI::st=HASH(0x4c04ca8) rc1/1 @1 g2 ima10004 pid#5724) at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 via at c:/BI_Domain/bimain/bin/../lib/App/Reverse/Ddl.pm line 230 -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x4c04ca8)~INNER) thr#d17d58