Showing posts with label Enterprise Edition. Show all posts
Showing posts with label Enterprise Edition. Show all posts

January 22, 2024

Step-by-Step Guide: Converting a Non-CDB to PDB with an Existing CDB

 

In this comprehensive guide, we'll walk you through the process of converting a Non-CDB (Non-Container Database) to a Pluggable Database (PDB) using an existing CDB (Container Database). Follow these clear and concise steps for a seamless transformation:

Assumption: Before converting a Non-CDB oracle instance into CDB , it is assumed an oracle CDB instance is already running.

 

Step 1: Cleanly Shutdown the Non-CDB Database(orcl)

  • Execute the following commands to gracefully shut down the Non-CDB Database named "orcl":

Invoke environment for orcl

[oracle@ocisoumya ~]$ . oraenv

ORACLE_SID = [orcl] ? orcl

The Oracle base remains unchanged with value /u01/app

 

[oracle@ocisoumya ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 15 15:45:10 2024

Version 19.21.0.0.0

 

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.21.0.0.0

 

SQL> show pdbs

SQL> shu immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

 

Step 2: Open the Database in Read-Only Mode

  • Once the database is cleanly shutdown, open it in read-only mode

SQL> startup open read only

ORACLE instance started.

 

Total System Global Area 4949276544 bytes

Fixed Size                  8935296 bytes

Variable Size             973078528 bytes

Database Buffers         3959422976 bytes

Redo Buffers                7839744 bytes

Database mounted.

Database opened.

 

 

Step 3: Describe the Database and Generate the XML File

  • Generate an XML file describing the database:

SQL> BEGIN
DBMS_PDB.DESCRIBE(pdb_descr_file => '/u01/orcl.xml');
END;
/

 

PL/SQL procedure successfully completed.

 

Step 4: Shutdown the Database

  • Shutdown the database again:

SQL> shu immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

 

Step 5: Check Compatibility and Resolve Issues

  • Verify compatibility with the target CDB and address any issues:

Invoke CDB environment and login to sqlplus

[oracle@ocisoumya ~]$ . oraenv

ORACLE_SID = [orcl] ? orclcdb

The Oracle base remains unchanged with value /u01/app

 

SQL> SET SERVEROUTPUT ON;

DECLARE

  compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(pdb_descr_file => '/u01/orcl.xml')

    WHEN TRUE THEN 'YES'

    ELSE 'NO'

  END;

BEGIN

  DBMS_OUTPUT.PUT_LINE(compatible);

END;

/

 

  • Check the PDB_PLUG_IN_VIOLATIONS view from the CDB for any errors.

SQL> select NAME,ERROR_NUMBER,type,MESSAGE,STATUS from PDB_PLUG_IN_VIOLATIONS;

 

NAME            ERROR_NUMBER TYPE      MESSAGE                                                      STATUS

--------------- ------------ --------- ------------------------------------------------------------ ---------

PDB$SEED                   0 ERROR     '19.21.0.0.0 Release_Update 2309301519' is installed in the  RESOLVED

                                       CDB but no release updates are installed in the PDB

 

ORCL                       0 WARNING   PDB plugged in is a non-CDB, requires noncdb_to_pdb.sql be r PENDING

                                       un.

 

ORCL                       0 WARNING   Undo mode mismatch: PDB using LOCAL undo.  CDB using SHARED  PENDING

                                       undo.

 

 

 

 

Step 6: Connect to the Target CDB

  • Connect to the CDB where the database will be plugged in:

[oracle@ocisoumya ~]$ . oraenv

ORACLE_SID = [orcl] ? orclcdb

The Oracle base remains unchanged with value /u01/app

 

Step 7: Create a Pluggable Database

  • Execute the following SQL command to create a Pluggable Database:

SQL> CREATE PLUGGABLE DATABASE ORCLPDB USING '/u01/orcl.xml'

COPY FILE_NAME_CONVERT = ('/u01/app/oradata/ORCL/', '/u01/app/oradata/ORCLCDB/ORCLPDB/'); 

 

Pluggable database created.

 

Step 8: Run the noncdb_to_pdb.sql Script

·       Switch to the PDB container and run the script for the conversion:



sql> ALTER SESSION SET CONTAINER=ORCLPDB;

sql> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

 

Step 9: Startup the PDB and Verify

·       Start up the PDB and confirm its open mode:

SQL> ALTER PLUGGABLE DATABASE OPEN;

Pluggable database altered.

 

SQL> SELECT name, open_mode FROM v$pdbs;

 

NAME            OPEN_MODE

--------------- ----------

ORCLPDB         READ WRITE

 

 

October 12, 2020

How to find out which Enterprise Edition features are being used in your oracle database ?

 How to find out which Enterprise Edition features are being used in your oracle database ?


I have seen many customer uses Enterprise Edition features unknowingly. They fall into trouble when Oracle performs an audit into their database and find out what are features they have using without their knowledge. As many of those features require extra cost.


A few of EE features that require extra licensing such as 


  • Oracle Partitioning
  • Oracle Label Security
  • Oracle On-Line Analytical Processing (OLAP)
  • Oracle Advanced Security
  • Oracle Advanced Compression
  • Oracle Database Vault
  • Oracle Database In-Memory
  • Oracle Active Data Guard
  • Oracle Multitenant 
  • Oracle Spatial and Graph


We can use following query to find out if any features that are being used cost extra.


 

spool DB_features_usage.lst

Set feedback off

Set lines 222

Col name  format a50 heading "Feature"

Col version  format a10 heading "Version"

Col detected_usages  format 999,990 heading "Detected|usages"

Col currently_used    format a06     heading "Curr.|used?"

Col first_usage_date  format a10     heading "First use"

Col last_usage_date   format a10     heading "Last use"

Col nop noprint

Break on nop skip 1 on name

SQL> Select decode(detected_usages,0,2,1) nop,

 name, version, detected_usages, currently_used,

  to_char(first_usage_date,'DD/MM/YYYY') first_usage_date, 

   to_char(last_usage_date,'DD/MM/YYYY') last_usage_date

   from dba_feature_usage_statistics

    order by nop, 1, 2;

 

 



This would save the output in a file by name DB_features_usage.lst.

Reference: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dblic/Licensing-Information.html#GUID-AB354617-6614-487E-A022-7FC9A5A08472   

   

Oracle Database 26ai Installation Using RPM on Oracle Linux 9 (OEL 9) – Step-by-Step Guide

  In this post I will describe the installation of Oracle Database 26ai 64-bit on Oracle Linux 9 (OL8) 64-bit. The installation requires a m...