Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help: DBI in oracle

Help: DBI in oracle

From: Mike F <u518615722_at_spawnkill.ip-mobilphone.net>
Date: Thu, 20 Sep 2001 19:34:50 GMT
Message-ID: <l.1001014491.1000518798@[64.94.198.252]>


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 );
        }

$dbh->disconnect();

But the first sql does not seem to work, the transaction did not use rollback segment I specified.

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/new
Received on Thu Sep 20 2001 - 14:34:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US