RE: Data Guard Question

  • From: Scott Canaan <srcdco@xxxxxxx>
  • To: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • Date: Wed, 28 Jul 2021 16:08:07 +0000

Thank you,  This was very helpful and I got it.  I did unset the 
db_create_file_dest on both databases.  I found that the db_file_name_convert 
had not been set on the standby, so I set it and that worked.  I appreciate the 
quick help!

Scott Canaan ‘88
Sr Database Administrator
Information & Technology Services
Finance & Administration
Rochester Institute of Technology
o: (585) 475-7886 | f: (585) 475-7520
srcdco@xxxxxxx<mailto:srcdco@xxxxxxx> | c: (585) 339-8659

CONFIDENTIALITY NOTE: The information transmitted, including attachments, is 
intended only for the person(s) or entity to which it is addressed and may 
contain confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon this 
information by persons or entities other than the intended recipient is 
prohibited. If you received this in error, please contact the sender and 
destroy any copies of this information.

From: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
Sent: Wednesday, July 28, 2021 11:59 AM
To: Scott Canaan <srcdco@xxxxxxx>
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: Data Guard Question

CAUTION: This message came from outside RIT. If you are unsure about the source 
or content of this message, please contact the RIT Service Center at 
585-475-5000 or help.rit.edu before clicking links, opening attachments or 
responding.


You need to UNSET db_create_file_dest  on the standby as it overrides 
db_file_name_convert.  DB_FILE_NAME_CONVERT will get ignored.
DB_CREATE_FILE_DEST will also create oracle managed file names (OMF filenames) 
as you see getting done in your example.

Then you need to make sure your DB_FILE_NAME_CONVERT parameter is set CORRECTLY 
to properly place the datafile in the right place.

So on db_file_name_convert should be something like:

IF primary location =  /oracle/data/DGRDTSTD/DGRDTSTD/datafile

Then db_file_name_convert on standby should be:

db_file_name_convert=' DGRDTSTD/DGRDTSTD',' DGRDTSTC/DGRDTSTC' ;

Your db_file_name_convert must properly set the full string you want to replace 
with the string you want to use as the replacement value.

Chris

On Wed, Jul 28, 2021 at 11:45 AM Scott Canaan 
<srcdco@xxxxxxx<mailto:srcdco@xxxxxxx>> wrote:
We’ve set up data guard with a primary and a secondary.  The primary is 
DGRDTSTD.  The secondary is DGRDTSTC.  We are running Oracle 19c on Linux Red 
Hat 7.

If I create a new data file on the primary, it creates it on the secondary, but 
in the wrong directory.  It creates a new directory, called DGRDTSTD and puts 
the new file there, instead of putting it in the DGRDTSTC directory.  I can 
move it and rename it, but I shouldn’t have to.

I tried to set the db_create_file_dest parameter on both databases:

on the standby:
alter system set db_create_file_dest='/oracle/data/DGRDTSTC';
on the primary:
alter system set db_create_file_dest='/oracle/data/DGRDTSTD';

All that did was to create the new file as:
/oracle/data/DGRDTSTC/DGRDTSTC/datafile/o1_mf_test_dat_jj2xgght_.dbf

The original file name was test_data_enc03.dbf.  I don’t know why it changed it.

What do I have to do to get the secondary to create the new data file in the 
correct directory (/oracle/data/DGRDTSTC) and do it right?

Thank you,

Scott Canaan ‘88
Sr Database Administrator
Information & Technology Services
Finance & Administration
Rochester Institute of Technology
o: (585) 475-7886 | f: (585) 475-7520
srcdco@xxxxxxx<mailto:srcdco@xxxxxxx> | c: (585) 339-8659
CONFIDENTIALITY NOTE: The information transmitted, including attachments, is 
intended only for the person(s) or entity to which it is addressed and may 
contain confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon this 
information by persons or entities other than the intended recipient is 
prohibited. If you received this in error, please contact the sender and 
destroy any copies of this information.

Other related posts: