0
Database version: Oracle 12cR1
Operating system: Oracle Linux 7.x
ASM: yes

Duplicate script:

cat duplicatetodisaster.sh

ORACLE_UNQNAME=xxx
ORACLE_SID=xxx
ORACLE_HOME=xxx


rman target sys/***@PROD auxiliary sys/***@DRC <<EOF
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
allocate auxiliary channel stby4 type disk;
duplicate target database to 'db_name' noopen from active database;
}
exit;
EOF

We are trying to create a disaster database with the log shipping method. Basic logic; production database will be duplicated and a disaster database will be created that continues in mount mode. Then, archivelogs transferred from production database will be recovered by disaster database and their continuity will be ensured.

As you can see in the rman script I shared; I tried to prevent the database from doing resetlogs by adding the noopen parameter, but still, after the restore and recover successfully finished, the controlfile created and resetlogs the database. Because of this, all incarnations in the database, DBID parameter and everything to keep it in sync with the production database are broken. Based on this, the transferred archivelogs cannot be recovered and continuity cannot be maintained. How can I prevent this situation?

Below, I share where resetlogs does exactly from the alert log:

Completed: CREATE CONTROLFILE REUSE SET DATABASE "DB_NAME" RESETLOGS ARCHIVELOG
  MAXLOGFILES    192
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES    32
  MAXLOGHISTORY     4382
 LOGFILE
  GROUP  11  SIZE 1536 M ,
  GROUP  12  SIZE 1536 M ,
  GROUP  13  SIZE 1536 M
 DATAFILE
  '+DATA/.../.../system...'
 CHARACTER SET WE8ISO8859P9

Another issue; there are about 250 datafiles, why did this happen for a single datafile...

Best regards,

1 Answer 1

0

So you described Data Guard with a standby database. If you want a standby database, tell RMAN to create a standby database:

duplicate target database for standby from active database;
5
  • Hello Balazs. I have installed a lot of Data Guard, I am aware of the structure. The structure we want to use here is not Data Guard, we want to try log shipping. I couldn't find a clear solution for my question, is there anything you can think of?
    – jrdba123
    Apr 6, 2021 at 13:59
  • @jrdba123 Sure, use the above, then don't configure Data Guard. Or even better, use the right tool (Data Guard) for the job. Apr 6, 2021 at 14:46
  • I tried it as you said on my test machine and it worked. After the command, it can be used for log shipping as I want, without configuring data guard. Thank you, I think there is no way to do it my way.
    – jrdba123
    Apr 6, 2021 at 15:29
  • 1
    "The structure we want to use here is not Data Guard, we want to try log shipping." But the heart of DG is log shipping. It's just that a full DG config adds a lot of management features as well. What you describe is a 'home grown' DG, which is often used for Std Ed. (which doesn't support full DG). So unless you are on StdEd, why would you not just go with a standard DG config?
    – EdStevens
    Apr 6, 2021 at 16:50
  • Hello @EdStevens . We use Enterprise Edition. However, the customer wants it like this, I explained to them the data guard structure and its advantages, but they insisted on this method. Yes, what we call log shipping already carries data guard logic. So you call this process 'home grown'. We call it 'manual replication'. Regards. :)
    – jrdba123
    Apr 6, 2021 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.