SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
Articles from Database administrator
workshop
How to unplug a PDB and plug it back into the same
CDB
You have just unplugged a PDB and want to know how to eventually plug it back into
the same container.
Let's assume I have a pluggable database named PDB003 and I am just able to
unplug it using the following commands:
view plainprint?
1. SQL> alter pluggable database pdb003 close immediate;
2.
3. Pluggable database altered.
4.
5. SQL> alter pluggable database PDB003 unplug into '/app/oracle/oradata/pdb003.xml';
6.
7. Pluggable database altered.
If you query the CDB_PDBS view you can receive useful information about all PDBs
contained: id, name, unique identifiers, SCN at the time of creation and the status.
The STATUS column has several values:
NEW, the pdb has been created but never opened
NORMAL, pdb available to be used
UNPLUGGED, the pdb has been unplugged
NEEDS UPGRADE, the pdb must be upgraded
CONVERTING, a non-CDB is going to be converted into a pdb
UNUSABLE, the pdb cannot be used (creation in progress)
In my case the PDB003 pluggable database is in an UNPLUGGED status as
expected:
view plainprint?
1. SQL> select * from CDB_PDBS;
2.
3. PDB_ID PDB_NAME DBID CON_UID GUID STATUS CREATION_SCN CON_ID
4. ---------- ---------- ---------- ---------- -------------------------------- ------------- -----------
- ----------
5. 2 PDB$SEED 4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL 233 1
6. 3 PDB001 1701599811 1701599811 E1F26215682E1142E045000000000001 NORMAL 1821405 1
7. 4 PDB002 1497027100 1497027100 E1F329ECE0F411E6E045000000000001 NORMAL 1844390 1
8. 5 PDB003 1448206714 1448206714 E2B9BE56B8B936CEE045000000000001 UNPLUGGED 1997215 1
To plug again the pluggable database PDB003 inside the original container
(CDB001) you cannot use a syntax like: ALTER PLUGGABLE DATABASE ...
PLUG (it doesn't exist in the "SQL Language Reference" manual a PLUG clause) ...
view plainprint?
1. SQL> alter pluggable database PDB003 plug;
2. alter pluggable database PDB003 plug
3. *
4. ERROR at line 1:
5. ORA-00922: missing or invalid option
... neither you can simply use CREATE PLUGGABLE DATABASE ... USING ...
view plainprint?
1. SQL> create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy tempfile reuse;
2. create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy tempfile reuse
3. *
4. ERROR at line 1:
5. ORA-65012: Pluggable database PDB003 already exists.
You need first to drop the pluggable database (DROP PLUGGABLE DATABASE
command) and then create it again (CREATE PLUGGABLE DATABASE
command).
In this way the pluggable database is plugged again into the same CDB and using
the same PDB name.
Have a look at the following commands:
view plainprint?
1. SQL> drop pluggable database PDB003;
2.
3. Pluggable database dropped.
4.
5. SQL> create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy;
6.
7. Pluggable database created.
8.
9. SQL> select PDB_NAME, STATUS from CDB_PDBS;
10.
11. PDB_NAME STATUS
12. ---------- -------------
13. PDB$SEED NORMAL
14. PDB001 NORMAL
15. PDB002 NORMAL
16. PDB003 NEW
17.
18. SQL> alter session set container=PDB003;
19.
20. Session altered.
21.
22. SQL> alter database open;
23.
24. Database altered.
25.
26. SQL> select count(*) from marcov.T1;
27.
28. COUNT(*)
29. ----------
30. 100
Have a look again at the CDB_PDBS view and note the differences compared with
the previous results.
All the unique identifiers of PDB003 have been recreated.
view plainprint?
1. SQL> select * from CDB_PDBS;
2.
3. PDB_ID PDB_NAME DBID CON_UID GUID STATUS CREATION_SCN CON_ID
4. ---------- ---------- ---------- ---------- -------------------------------- ------------- -----------
- ----------
5. 2 PDB$SEED 4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL 233 1
6. 3 PDB001 1701599811 1701599811 E1F26215682E1142E045000000000001 NORMAL 1821405 1
7. 4 PDB002 1497027100 1497027100 E1F329ECE0F411E6E045000000000001 NORMAL 1844390 1
8. 5 PDB003 1448206714 1448206714 E2B9BE56B8B936CEE045000000000001 NORMAL 3110422 1
That's all.

Contenu connexe

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Oracle Database 12c: How to unplug a pdb and plug it back into the same cdb

  • 1. Articles from Database administrator workshop How to unplug a PDB and plug it back into the same CDB You have just unplugged a PDB and want to know how to eventually plug it back into the same container. Let's assume I have a pluggable database named PDB003 and I am just able to unplug it using the following commands: view plainprint? 1. SQL> alter pluggable database pdb003 close immediate; 2. 3. Pluggable database altered. 4. 5. SQL> alter pluggable database PDB003 unplug into '/app/oracle/oradata/pdb003.xml'; 6. 7. Pluggable database altered. If you query the CDB_PDBS view you can receive useful information about all PDBs contained: id, name, unique identifiers, SCN at the time of creation and the status. The STATUS column has several values: NEW, the pdb has been created but never opened NORMAL, pdb available to be used UNPLUGGED, the pdb has been unplugged NEEDS UPGRADE, the pdb must be upgraded CONVERTING, a non-CDB is going to be converted into a pdb UNUSABLE, the pdb cannot be used (creation in progress) In my case the PDB003 pluggable database is in an UNPLUGGED status as expected: view plainprint? 1. SQL> select * from CDB_PDBS; 2. 3. PDB_ID PDB_NAME DBID CON_UID GUID STATUS CREATION_SCN CON_ID 4. ---------- ---------- ---------- ---------- -------------------------------- ------------- ----------- - ---------- 5. 2 PDB$SEED 4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL 233 1 6. 3 PDB001 1701599811 1701599811 E1F26215682E1142E045000000000001 NORMAL 1821405 1 7. 4 PDB002 1497027100 1497027100 E1F329ECE0F411E6E045000000000001 NORMAL 1844390 1 8. 5 PDB003 1448206714 1448206714 E2B9BE56B8B936CEE045000000000001 UNPLUGGED 1997215 1 To plug again the pluggable database PDB003 inside the original container (CDB001) you cannot use a syntax like: ALTER PLUGGABLE DATABASE ... PLUG (it doesn't exist in the "SQL Language Reference" manual a PLUG clause) ... view plainprint? 1. SQL> alter pluggable database PDB003 plug; 2. alter pluggable database PDB003 plug 3. * 4. ERROR at line 1: 5. ORA-00922: missing or invalid option ... neither you can simply use CREATE PLUGGABLE DATABASE ... USING ... view plainprint? 1. SQL> create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy tempfile reuse; 2. create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy tempfile reuse 3. * 4. ERROR at line 1: 5. ORA-65012: Pluggable database PDB003 already exists.
  • 2. You need first to drop the pluggable database (DROP PLUGGABLE DATABASE command) and then create it again (CREATE PLUGGABLE DATABASE command). In this way the pluggable database is plugged again into the same CDB and using the same PDB name. Have a look at the following commands: view plainprint? 1. SQL> drop pluggable database PDB003; 2. 3. Pluggable database dropped. 4. 5. SQL> create pluggable database PDB003 using '/app/oracle/oradata/pdb003.xml' nocopy; 6. 7. Pluggable database created. 8. 9. SQL> select PDB_NAME, STATUS from CDB_PDBS; 10. 11. PDB_NAME STATUS 12. ---------- ------------- 13. PDB$SEED NORMAL 14. PDB001 NORMAL 15. PDB002 NORMAL 16. PDB003 NEW 17. 18. SQL> alter session set container=PDB003; 19. 20. Session altered. 21. 22. SQL> alter database open; 23. 24. Database altered. 25. 26. SQL> select count(*) from marcov.T1; 27. 28. COUNT(*) 29. ---------- 30. 100 Have a look again at the CDB_PDBS view and note the differences compared with the previous results. All the unique identifiers of PDB003 have been recreated. view plainprint? 1. SQL> select * from CDB_PDBS; 2. 3. PDB_ID PDB_NAME DBID CON_UID GUID STATUS CREATION_SCN CON_ID 4. ---------- ---------- ---------- ---------- -------------------------------- ------------- ----------- - ---------- 5. 2 PDB$SEED 4063489868 4063489868 E19363E52C005C9AE045000000000001 NORMAL 233 1 6. 3 PDB001 1701599811 1701599811 E1F26215682E1142E045000000000001 NORMAL 1821405 1 7. 4 PDB002 1497027100 1497027100 E1F329ECE0F411E6E045000000000001 NORMAL 1844390 1 8. 5 PDB003 1448206714 1448206714 E2B9BE56B8B936CEE045000000000001 NORMAL 3110422 1 That's all.