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

PDB unplug

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

1. Use SQL DEVELOPER

two。 Use statement

SQL > col pdb_name format A20

SQL > col status format A20

SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS

PDBTEST NORMAL

PDB$SEED NORMAL

CLONEPDB NORMAL

SQL > alter pluggable database clonepdb close immediate

SQL > alter pluggable database clonepdb unplug into'C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ database\ clonepdb.xml'

SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS

-- PDBTEST NORMAL

PDB$SEED NORMAL

CLONEPDB UNPLUGGED

SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS--

PDBTEST NORMAL

PDB$SEED NORMAL CLONEPDB UNPLUGGED

SQL > drop pluggable database clonepdb keep datafiles

The pluggable database has been deleted.

SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS

PDBTEST NORMAL

PDB$SEED NORMAL

C:\ Users\ Administrator > mkdir C:\ app\ Administrator\ virtual\ oradata\ newtest\ clonepdb_plug

C:\ Users\ Administrator > sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thursday 14 December 15:47:00 2017

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

Connect to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production

SQL > create pluggable database clonepdb_plug using'C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ database\ clonepdb.xml' MOVE 2 FILE_NAME_CONVERT= ('C:\ app\ Administrator\ virtual\ oradata\ newtest\ CLONEPDB','C:\ app\ Administrator\ virtual\ oradata\ newtest\ clonepdb_plug')

The plug-in database has been created.

SQL > col status format A20

SQL > col pdb_name format A20

SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS

PDBTEST NORMAL

PDB$SEED NORMAL

CLONEPDB_PLUG NEW

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 PDBTEST READ WRITE NO 4 CLONEPDB_PLUG MOUNTED SQL > alter pluggable database CLONEPDB_PLUG open read write

The plug-in database has changed.

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 PDBTEST READ WRITE NO 4 CLONEPDB_PLUG READ WRITE NO SQL > select pdb_name, status from cdb_pdbs

PDB_NAME STATUS

PDBTEST NORMAL

PDB$SEED NORMAL

CLONEPDB_PLUG NORMAL

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