package sample; use strict; use DBI; my $count = 0; sub showtime () { print "Starting loop \n"; #while ( $count < 50 ) { $count++; print ("Connecting to DB \n"); # Modify sid, user, password values. my $dbh = DBI->connect("DBI:Oracle:host=localhost;port=1521;sid=syno",'temipsyno','temipsyno',{PrintError => 1, RaiseError => 1, ora_envhp => 0}); #my $cmd = "grep VmRSS /proc/$$/status"; # Check no. of fd's after connection to db. #my $cmd = "ls -l /proc/$$/fd | grep ocius"; #print `$cmd`; sleep(1); print ("Disconnecting from DB \n"); $dbh->disconnect or warn "Disconnection failed: $DBI::errstr\n"; #} print "Ending script \n"; } 1;