Monday, May 11, 2020

Relocated PDBs in Oracle Database 18c

Oracle 18c allows RMAN backups created before the non-CDB or PDB was migrated into a different target CDB can be used for recovery operations. The COMPATIBLE parameter of the source and Oracle Cloud must be set to 18.0.0 or higher

The RMAN commands used to backup and recovery CDBs and PDBs are the same as those used for non-CDBs, with few variations in the syntax.

The backup and recovery operations performed on non-CDBs can also be performed on CDBs and PDBs. This includes the following:
– Full and incremental backups
– Complete and point-in-time recovery (PITR)
– Reporting operations (such as listing and cross-checking backups)
– Flashback Database

We need take metadata for the existing backups and available to the destination CDB. To export metadata user needs to run DBMS_PDB.EXPORTRMANBACKUP procedure on the source database.

EXECUTE DBMS_PDB.exportrmanbackup();
Or
EXECUTE DBMS_PDB.exportrmanbackup('EMP_PDB');

In case if you are unplug you no need to run this command as unplug already includes the metadata.

Convert NON-CDB to PDB : As we have metadata, now we can covert the NON-CDB instance to PDB.

Step1: Open the non-CDB instance in read-only mode and describe and shutdown

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP OPEN READ ONLY;
SQL> BEGIN
DBMS_PDB.DESCRIBE( pdb_descr_file => '/oracle/empdb.xml');
END;
SQL> SHUTDOWN IMMEDIATE;

Step2: Create the new pluggable database using the non-CDB description file that we have taken in above step

SQL> CREATE PLUGGABLE DATABASE empdb_pdb USING '/oracle/empdb.xml' COPY;
SQL> ALTER SESSION SET CONTAINER= empdb_pdb;
SQL> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql
SQL> ALTER PLUGGABLE DATABASE OPEN;
SQL> ALTER PLUGGABLE DATABASE SAVE STATE;

Step3:- Restore and recovery using pre-plugin backup

SQL> ALTER PLUGGABLE DATABASE empdb_pdb CLOSE IMMEDIATE;

RMAN> SET PREPLUGIN CONTAINER=db18cpdb;
RMAN> RESTORE PLUGGABLE DATABASE empdb_pdb FROM PREPLUGIN;
RMAN> RECOVER PLUGGABLE DATABASE empdb_pdb FROM PREPLUGIN;

Sometimes users may come across RMAN-06054 error in that case you need to CATALOG the missing archive log and start the recovery again.

RMAN-06054: media recovery requesting unknown archived log for thread 3 sequence 94983
RMAN>SET PREPLUGIN CONTAINER= empdb_pdb;
RMAN>CATALOG PREPLUGIN ARCHIVELOG 'oracle/archivelog/arc_empdb_pdb_3_94983.arc';
RMAN>RECOVER PLUGGABLE DATABASE empdb_pdb FROM PREPLUGIN;

Perform normal recovery and open the database

RMAN>RECOVER PLUGGABLE DATABASE empdb_pdb;
RMAN>ALTER PLUGGABLE DATABASE empdb_pdb OPEN;


Reference:
Check preplugin backups available to the CDB instance
RMAN> LIST PREPLUGIN BACKUP OF PLUGGABLE DATABASE empdb_pdb;

Preplugin backups are usable only on the destination CDB into which you plug in the source non-CDB or PDB

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

41 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Bet Mr. Santorum's kids just loved finding out what the Left think their name means. Did you dance a little Hitlerian jig when his daughter's hospitalization was announced as the reason for his withdrawal? 123movies

    ReplyDelete
  3. I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one
    PMP Certification
    PMP Course
    PMP Course in Malaysia
    PMP Training in Malaysia

    ReplyDelete
  4. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..
    data science course

    ReplyDelete
  5. You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject!
    PMP Certification 360DigiTMG
    PMP Course 360DigiTMG
    PMP Course in Malaysia 360DigiTMG
    PMP Training in Malaysia 360DigiTMG
    PMP Training 360DigiTMG

    ReplyDelete
  6. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.data science course

    ReplyDelete
  7. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more. PMP Certification
    PMP Course
    PMP Course in Malaysia
    PMP Training in Malaysia
    PMP Training

    ReplyDelete
  8. What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.data science course

    ReplyDelete
  9. Kansas City Chiefs vs. Houston Texans Results. The following is a list of all regular season and postseason games played between the
    Sattamatka

    ReplyDelete
  10. Hello there, simply was aware of your blog through Google, and located that it’s really informative. win915

    ReplyDelete
  11. first-rate knowledge, restructure everybody mind merely reference assign assist to to it Situs IDN Poker

    ReplyDelete
  12. This will open a window containing the HTML source code of the page. Inspect an HTML Element: Right-click on an element basic HTML CODE

    ReplyDelete
  13. I have just found this website while searching over the internet, you have posted valuable information which i like reading. 토토

    ReplyDelete
  14. exciting publicize. i have Been questioning more or less this count number, as a end result thanks for posting. pretty cold publication.It 's in fact very fine and useful say.thank you 먹튀검증 안전놀이터 스포츠중계 꽁머니 먹튀검증 토토사이트 안전놀이터 꽁머니

    ReplyDelete
  15. I have just found this website while searching over the internet, you have posted valuable information which i like reading. Click Here
    Click Here
    Click Here

    ReplyDelete
  16. These thoughts just blew my mind. I am glad you have posted this. ผลบอล

    ReplyDelete
  17. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article먹튀검증업체

    ReplyDelete
  18. I have read the title which you have made about self hosted. You have made a great effort in making this post which is appreciable 먹튀검증사이트

    ReplyDelete
  19. I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Status moj whatsApp

    ReplyDelete
  20. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. click here

    ReplyDelete
  21. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information... click here

    ReplyDelete
  22. Good day! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in trading links or maybe guest writing a blog article or 슬롯추천

    vice-versa? My blog goes over a lot of the same topics as yours and I believe we could greatly
    benefit from each other. If you happen to be interested feel
    free to shoot me an e-mail. I look forward
    to hearing from you! Great blog by the way! 온라인슬롯

    ReplyDelete
  23. 온라인카지노사이트 I must say, as a lot as I enjoyed reading what you had to say, I couldnt help but lose interest after a while.

    ReplyDelete
  24. I really liked your article post.Really looking forward to read more. Great.
    카지노사이트

    ReplyDelete
  25. Everything is very open with a precise explanation of the issues.
    It was really informative. Your website is useful. Thank
    you for sharing! 토토

    ReplyDelete
  26. I’m thinking some of my readers might find a bit of this interesting. Do you mind if I post a clip from this and link back? Thanks 안전놀이터


    ReplyDelete
  27. When I read your article on this topic, the first thought seems profound and difficult. There is also a bulletin board for discussion of articles and photos similar to this topic on my site, but I would like to visit once when I have time to discuss this topic. sòng bạc


    ReplyDelete
  28. I am a new user of this site so here i saw multiple articles and posts posted by this site,I curious more interest in some of them hope you will give more information on this topics in your next articles.  Samsung Galaxy Tab A 8.4 (2020) Price

    ReplyDelete
  29. I read this article. I think You put a lot of effort to create this article. I appreciate your work Oppo Find X2 Price

    ReplyDelete
  30. Indeed, this made them think what different exercises are useful for those of us who wind up out and about or have restricted gear choices. matka

    ReplyDelete
  31. Thank you so much for providing good quality information.I think it would not have been easy to collect this information and organize it in an easy to understand way.igtok

    ReplyDelete
  32. very nice and great article, thanks for sharing with us! satta matka

    ReplyDelete
  33. I believe the things you whatever you have enclosed, all the way throughout the post are peaceful striking, good job and great hard work. I found it very striking and enjoyed reading all of it...stay it up, good-looking job. Thanks. andrey belyakov

    ReplyDelete
  34. I have read your post, thank you for sharing, your post is very helpful to me. I hope you will have many good articles to bring to the reader.I want to start a credit card processing company

    ReplyDelete
  35. Keep up the good work , I read few posts on this web site and I conceive that your blog is very interesting and has sets of fantastic information. japritoto

    ReplyDelete
  36. Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job!  Oppo F17 Pro Price in Nigeria

    ReplyDelete
  37. Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject Samsung galaxy m22 Price in Sri Lanka

    ReplyDelete