Path: news.easynews.com!easynews!peer1-sjc1.usenetserver.com!usenetserver.com!news.spiralweb.com!xmission!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
From: Uwe Schneider <uwe@richard-schneider.de>
Newsgroups: comp.lang.perl.modules,comp.databases.oracle.server
Subject: Re: Problems backing up Oracle control files via DBD::Oracle
Date: Fri, 22 Feb 2002 20:54:04 +0100
Organization: Pinguin-beherrschte Domain
Lines: 54
Message-ID: <3C76A1DC.B7D28206@richard-schneider.de>
References: <bc63e6db.0202210856.5fb49f14@posting.google.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.t-online.com 1014407642 07 5285 ODFITPBSSxannc 020222 19:54:02
X-Complaints-To: abuse@t-online.com
To: Gustar <pobox400@yahoo.com>
X-Sender: 520006941783-0001@t-dialin.net
X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.4.4-4GB i586)
X-Accept-Language: en
Xref: easynews comp.lang.perl.modules:37484 comp.databases.oracle.server:136187
X-Received-Date: Fri, 22 Feb 2002 12:53:06 MST (news.easynews.com)

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@richard-schneider.de
DE-76356 Weingarten | http://www.richard-schneider.de/uwe
Linux - OS al dente!
