Skip to Main Content
  • Questions
  • Standby from hot backup and 2 identical files

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Kirill.

Asked: September 12, 2016 - 12:35 pm UTC

Last updated: September 13, 2016 - 3:04 am UTC

Version: 11.2.0.2.0

Viewed 1000+ times

You Asked

Hi, friends!

We have a primary server, standby and the second standby. The 2nd stndby is a new server where i want to migrate database. I made a hot backup. 2nd stndby have a 1 directory for datafiles, but primary have 3 directories.
In init file 2nd stndby db_file_name_convert= /oradata/primary/data_files/data/, /oradata/2nd_standby/data_files/data/, /oradata/primary/data_files2/, /oradata/2nd_standby/data_files/, /oradata/primary/data_files3/, /oradata/2nd_standby/data_files/

but now i have a issue with 2 files: '/oradata/primary/data_files/data/file06.dbf',
'/oradata/primary/data_files2/file06.dbf',
'/oradata/primary/data_files2/file02.dbf',
'/oradata/primary/data_files/data/file02.dbf'
as You understand i can't copy the same datafile into 1 directory with replace.
maby i can move the second files: '/oradata/primary/data_files/data/file02.dbf' and '/oradata/primary/data_files/data/file06.dbf' to another catalog on the 2nd stndby and insert into db_file_name_convert the second catalog...
for example: i have common directory for all DB /oradata/2nd_standby/data_files
for datafiles /oradata/2nd_standby/data_files/data
for for second files /oradata/2nd_standby/data_files/data2
and insert into db_file_name_convert = /oradata/2nd_standby/data_files/data2

what do You think about it?

and Connor said...

With regard to:

but now i have a issue with 2 files:
'/oradata/primary/data_files/data/file06.dbf',
'/oradata/primary/data_files2/file06.dbf',
'/oradata/primary/data_files2/file02.dbf',
'/oradata/primary/data_files/data/file02.dbf'

then yes, you could either

- manipulate the db_file_name_convert parameter to handle these specific cases before applying the general conversion, or
- so the directory naming system you mentioned in your post

But if it were me...I see two files called "file06.dbf" just being a risk factor in all sorts of other ways (eg, if later I'm doing imagecopies with rman, or transportable tablespaces etc, or a simply move datafile operation and I pick the wrong one).

I would take a tiny outage window (it would be seconds) and rename the file to something unique and then the whole problem goes away.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

You'r damn right sir

Kirill Pashkov, September 13, 2016 - 11:49 am UTC

Thx Connor a lot!

I think the same. It will be correctly to rename files.