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: Problems backing up Oracle control files via DBD::Oracle

Re: Problems backing up Oracle control files via DBD::Oracle

From: Uwe Schneider <uwe_at_richard-schneider.de>
Date: Fri, 22 Feb 2002 20:54:04 +0100
Message-ID: <3C76A1DC.B7D28206@richard-schneider.de>


Hi Gustar,

Gustar wrote:
>
> ALTER DATABASE BACKUP CONTROLFILE TO '/path/to/file'
>
> and indeed this command does work when executed from within svrmgrl.
>
> When I attempt to execute a similar command from with a Perl DBI
> script I encounter a number of errors (which will be included below).
>
> ERROR EVENT 1580 'ORA-01580: error creating control backup file
> /ora3/hotbackup/SADB_0221/control.ctl
> ORA-27040: skgfrcre: create error, unable to create file
> SVR4 Error: 2: No such file or directory (DBD ERROR: OCIStmtExecute)'
> on DBI::st=HASH(0x269cbc)

A corresponding script works fine here:

>cat test.pl

#!/usr/bin/perl -w  

use strict;  

use DBI;    

my $dbh = DBI->connect("dbi:Oracle:linx",'system','manager') || die;  

print STDERR "Connected\n";  

$dbh->do("ALTER DATABASE BACKUP CONTROLFILE TO '/tmp/controlfile'") || die;
$dbh->disconnect();

>test.pl

Connected
>ls -l /tmp/controlfile

-rw-r----- 1 oracle users 1435648 Feb 22 20:49 /tmp/controlfile

So I guess you should take the OS error message more seriously:

SVR4 Error: 2: No such file or directory

I guess the path is not correct. Try "touch /ora3/hotbackup/SADB_0221/control.ctl".

Uwe

-- 
Uwe Schneider       | Telefon +49 7244 / 609504
Haydnstr. 1         | Mail    uwe_at_richard-schneider.de
DE-76356 Weingarten | http://www.richard-schneider.de/uwe
Linux - OS al dente!
Received on Fri Feb 22 2002 - 13:54:04 CST

Original text of this message

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