Behaviour of asmcmd cp command - Oracle 11.2.0.2.0 Solaris 64 bit

  • From: Peter Hitchman <pjhoraclel@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 15 Dec 2010 11:24:16 +0000

Hi,
A database was created, but I wanted to re-name it, so I used the nid
method documented on Oracle-Base and all was well.

Then I realized that controlfiles, datafiles etc were still in a
directory in the ASM diskgroup using the old name in the path name,
the online redo logs however got re-created in the right place as part
of the above process.

So I created the paths I needed and looked on MOS for the best thing
to do to move the existing files.
The note I found (564993.1) documents "moving" the files by creating
aliases, it works but the old files are still there and I wanted to
remove the path names containing the old database name
and the files themselves.

So I tried copying them, copying the original file name to one without
a file number/incarnation like this (else I get ORA-15046):

ASMCMD> cp +DATA/RMAN211/DATAFILE/CATALOG.270.737288713
+DATA/RMAN112/datafile/CATALOG.dbf
copying +DATA/RMAN211/DATAFILE/CATALOG.270.737288713 ->
+DATA/RMAN112/datafile/CATALOG.dbf

as a result the +DATA/RMAN112/datafile/ contains an alias to
+DATA/ASM/DATAFILE/CATALOG.dbf.263.737805455

Where did the "ASM" bit come from?

Then I mounted the database and renamed the datafiles, so it knows
where to look.

I dealt with the controlfiles by "restoring" them from the original
copies using rman and it looks to me that the only way to properly
deal with the data files is to
"backup as copy database format '<DG NAME>'" and then switch to the
backup copy. All of which seems very long winded, just to rename a
path name to some files.

What I have done works and I been able to remove the original
directories under the old database name, but can anyone explain to me
why the asmcmd cp command works the way it does and
why I have ended up with files in +DATA/ASM, when I explicitly copied
them to +DATA/RMAN112 and that's what the cp command said it was
doing.

Thanks

Pete
--
//www.freelists.org/webpage/oracle-l


Other related posts:

  • » Behaviour of asmcmd cp command - Oracle 11.2.0.2.0 Solaris 64 bit - Peter Hitchman