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: RMAN 9i: Resetting/Clearing name for controlfile backup

Re: RMAN 9i: Resetting/Clearing name for controlfile backup

From: Alexander Skwar <usenet_at_alexander.skwar.name>
Date: Tue, 10 Jul 2007 20:00:10 +0200
Message-ID: <3850368.VQTuRkWvoh@m-id.message-center.info>


ยท sybrandb <sybrandb_at_gmail.com>:

> On Jul 10, 4:26 pm, Alexander Skwar <alexan..._at_skwar.name> wrote:

>> Hello.
>>
>> In RMAN of Oracle 9i, I made a mistake when I set the name for the
>> CONTROLFILE AUTOBACKUP FORMAT. What do I have to do, to "CLEAR" that
>> value, so that I can start over again?
>>
>> I tried:
>>
>> RMAN> configure CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
>>
>> old RMAN configuration parameters:
>> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/cf%F?;';
>> RMAN configuration parameters are successfully reset to default value
>>
>> RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/%d,cf,%Y%M%D,%s_%t,%p_%c,%F';
>>
>> old RMAN configuration parameters:
>> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/cf%F?;';
>> new RMAN configuration parameters:
>> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/%d,cf,%Y%M%D,%s_%t,%p_%c,%F';
>> new RMAN configuration parameters are successfully stored
>>
>> RMAN> backup datafile 3;
>>
>> Starting backup at 10-JUL-07
>> using channel ORA_DISK_1
>> channel ORA_DISK_1: starting full datafile backupset
>> channel ORA_DISK_1: specifying datafile(s) in backupset
>> input datafile fno=00003 name=/opt/apps/oracle/oradata/BNRTEST/cwmlite01.dbf
>> channel ORA_DISK_1: starting piece 1 at 10-JUL-07
>> channel ORA_DISK_1: finished piece 1 at 10-JUL-07
>> piece handle=/tmp/backup/BNRTEST,data,20070710,30_627581829,1_1 comment=NONE
>> channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
>> Finished backup at 10-JUL-07
>>
>> Starting Control File and SPFILE Autobackup at 10-JUL-07
>> piece handle=/tmp/backup/cfc-3007484779-20070710-05?; comment=NONE
>> Finished Control File and SPFILE Autobackup at 10-JUL-07
>>
>> As you can see, the control file was backed up to
>> "/tmp/backup/cfc-3007484779-20070710-05?;" which is not a name that I like.
>> The "?" is not really a question mark, but some "strange" value:
>>
>> --($:~/Documents/Downloads/Unix/Oracle)-- ls -la /tmp/backup/cfc-3007484779-20070710-05*
>> -rw-r----- 1 oracle dba 2375680 Jul 10 16:17 /tmp/backup/cfc-3007484779-20070710-05?;
>>
>> What do I have to do, so that RMAN accepts and uses the new value for
>> CONTROLFILE AUTOBACKUP FORMAT?
>>
>> Thanks a lot,
>>
>> Alexander Skwar
> 
> You have to set the autobackup format to something *sensible*, which
> will actually get recognized by RMAN.

Uhm, is '/tmp/backup/%d,cf,%Y%M%D,%s_%t,%p_%c,%F' not sensible? And what does CLEAR do? According to the doc, it should reset the value to a default: "Specify CLEAR to return the format to the default %F". Why does this not work?

Anyway, the naming is not the problem. You might want to skip to the end of this post.

> As there can be only one (1) autobackup controlfile backup set, all > the formats above don't make any sense.

Why not? They contain perfectly legal values - at least as far as the documentation is concerned.

> The only modifier which is allowed in a controlfile autobackup is %F.

Uh? Why's that? The documentation states otherwise.

> %F is the DBID followed by the date in YYYYMMDD format and a piece
> number.
> That said, stop trying to do the impossible, reread the documentation

Hm. I just did. I read http://download.oracle.com/docs/cd/B10501_01/server.920/a96565/rcmsynta15.htm#79956 There, it says that a format_string is to be used. A format_string must contain %F. According to the doc, it can also contain other variables. According to http://download.oracle.com/docs/cd/B10501_01/server.920/a96565/rcmsynta9.htm#1015749, it contain all the variables I used. Or do I misunderstand something? The doc says:

,----[ Oracle9i Recovery Manager Reference, CONTROLFILE AUTOBACKUP FORMAT ]

| Configures the default filename format for the control file autobackup
| on the specified device type. By default, the initial format is %F for
| all devices. Any default format string specified with CONFIGURE must
| include the %F substitution variable (see BACKUP).    
`----

On the linked "BACKUP" documentation section, I find that all the variables, like %s, %Y%M%D etc.pp. can be used - it doesn't say, that they cannot be used.

> to confirm my post

Not confirmed, or at least not understood, as the documentation states otherwise.

Anyway - even if does not make sense, why does it not work? When I tried out what I read in the documentation, I also set the FORMAT for the backup files to "non sensical" values. I used %variables, which did not exist. Result: I got files, which contained % in the filename (eg. a %I). Is the naming for controlfiles really so different, as far as RMAN is concerned?

> and set it to /tmp/backup/%F.ctl

Doesn't work.

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/%F.ctl';

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/cf%F?;'; old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/cf%F'; new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/backup/%F.ctl'; new RMAN configuration parameters are successfully stored

RMAN> backup datafile 3;

Starting backup at 10-JUL-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00003 name=/opt/apps/oracle/oradata/BNRTEST/cwmlite01.dbf channel ORA_DISK_1: starting piece 1 at 10-JUL-07 channel ORA_DISK_1: finished piece 1 at 10-JUL-07 piece handle=/tmp/backup/BNRTEST,data,20070710,34_627594508,1_1 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 10-JUL-07

Starting Control File and SPFILE Autobackup at 10-JUL-07 piece handle=/tmp/backup/cfc-3007484779-20070710-07?; comment=NONE Finished Control File and SPFILE Autobackup at 10-JUL-07

I just did like you told me - I tried to set the name format to '/tmp/backup/%F.ctl'. RMAN didn't use this value. Why? Or did I forget to do something?

Confused,

Alexander Skwar

-- 
Everything you like is forbidden.
                -- Axiom
Received on Tue Jul 10 2007 - 13:00:10 CDT

Original text of this message

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