Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle 12c non-cdb upgraded to cdb mode

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle 12c non-cdb upgraded to cdb mode

Under the same host, there is a non-cdb database, and then create an instance of cdb.

SQL > select name,cdb from v$database

NAME CDB

EID NO

1 row selected.

Close the database and open it in read only mode

16:50:58 SQL > shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

16:51:39 SQL > startup open read only

ORACLE instance started.

Total System Global Area 1426063360 bytes

Fixed Size 8620704 bytes

Variable Size 486540640 bytes

Database Buffers 922746880 bytes

Redo Buffers 8155136 bytes

Database mounted.

Database opened.

SQL > select name,open_mode,cdb from v$database

NAME OPEN_MODE CDB

-

EID READ ONLY NO

1 row selected.

Generate a database description file in xml format

SQL > BEGIN

2 DBMS_PDB.DESCRIBE (pdb_descr_file = >'/ home/oracle/EID.xml')

3 END

4 /

PL/SQL procedure successfully completed.

Shut down the database

SQL > shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

Connect to the cdb database

SQL > CREATE PLUGGABLE DATABASE mpdb01 USING'/ home/oracle/EID.xml'

2 COPY

3 FILE_NAME_CONVERT = ('/ u02 *

Pluggable database created.

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED

-

2 PDB$SEED READ ONLY NO

3 MPDB01 MOUNTED

SQL > alter session set container=MPDB01

Session altered.

Execute the following command. Note that this command clears the shared pool, so pay attention to the production environment.

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

SQL > alter pluggable database MPDB01 open

Pluggable database altered.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report