RE: Converting archivelog file name from FRA to %t_%s_%r.dbf
Date: Fri, 3 Jun 2011 16:05:58 +0200
Message-ID: <4814386347E41145AAE79139EAA398981502899445_at_ws03-exch07.iconos.be>
Hmm
Not sure if you can copy a file from asm to os using utl_file.fcopy, but that would be my first try. The destination name can then easily be generated using the v$archived_log view.
My second attempt would be to use the asmcmd cp command.
Regards,
Freek D'Hooge
Uptime
Oracle Database Administrator
email: freek.dhooge_at_uptime.be
tel +32(0)3 451 23 82
http://www.uptime.be
disclaimer: www.uptime.be/disclaimer
---
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Martin Bach
Sent: vrijdag 3 juni 2011 15:37
To: 'Oracle Mailinglist'
Subject: Converting archivelog file name from FRA to %t_%s_%r.dbf
Hi all,
A bit of a funny question which has been raised today. Oracle 11.2.0.2.2 RAC with ASM on Linux.
Let's assume for a moment that you have a production cluster with a disk group +ARCH used as the FRA. The archived redo logs follow the naming convention shown here:
thread_threadNumber_seq_sequenceNumber.fileID.incarnation
An example is thread_1_seq_94.348.752827039
Thread and sequence number are self explanatory. The rest of the file name is composed of the file_number and file_incarnation as shown in v$asm_file, i.e. you could find this file in asm by querying
SQL> select * from v$asm_file where file_number = 348 and incarnation = 752827039;
So far so good. Now what I need to do is copy these files from the production cluster to another cluster and apply them to a clone of the production database to roll it forward.
The question really is: do you know of a simple enough way to transform the files from their FRA naming convention into the %t_%s_%r.dbf format? RMAN cannot be used unfortunately, and it's too long a story to tell here.
Ideally I'll run a shellscript which transforms thread_1_seq_94.348.752827039 into 1_94_12345623432.dbf
Thanks in advance for any pointers!
Martin
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 03 2011 - 09:05:58 CDT