Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Help: DBI in oracle
Hi, I am posting here because I know a lot of good DBAs are also good
perl programmer. I have a perl scripts which I want to use only one rollback segment.
the script is like the follow:
_---------------------------------------------------------------- my $dbh = DBI->connect ( 'dbi:Oracle:test',
'test',
'test',
{ PrintError => 1, RaiseError => 1, AutoCommit => 1 } ) || die "Database Connection not made $DBI::errstr" ;
#increate day in a month
my $count1 = 1;
while ($count1 < 32)
{
my $T1="to_date('2001/1/$count1 00:00:00','yyyy/mm/dd hh24:mi:ss')";
my $T2="to_date('2001/1/$count1 23:59:59','yyyy/mm/dd hh24:mi:ss')";
$count1 = $count1 + 1;
# set rollback segment
my $sql = qq{ set transaction use rollback segment RBS0 }; $dbh->do ( $sql ); #move data from test to archtest my $sql = qq{ INSERT INTO table1 select * from table2 where polltime > $T1 and polltime < $T2}; $dbh->do ( $sql ); }
Could somebody help me out?
Thanks for your help
-- Sent by dbadba62 from hotmail piece of com This is a spam protected message. Please answer with reference header. Posted via http://www.usenet-replayer.com/cgi/content/newReceived on Thu Sep 20 2001 - 14:34:50 CDT