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 -> Re: Help: DBI in oracle

Re: Help: DBI in oracle

From: Markus Stuhlpfarrer <mstuhlpfarrer_at_hollomey.com>
Date: Tue, 25 Sep 2001 06:38:12 GMT
Message-ID: <3BB02618.A902D5C7@hollomey.com>


hi,
the mistake in your script is that the set that you want to make is an sql*plus command and not an oracle command
you cannot execute that from any client application except sql*plus there must be some alter session parameter or something like that, that does the same

Mike F wrote:

> 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 Tue Sep 25 2001 - 01:38:12 CDT

Original text of this message

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