程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> oracle12c學習之三nocdb轉換成pdb

oracle12c學習之三nocdb轉換成pdb

編輯:Oracle教程

oracle12c學習之三nocdb轉換成pdb


01:23:06 sys@orcl> select name, decode(cdb, 'YES', 'Multitenant Option enabled', 'Regular 12c Database: ') "Multitenant Option" , open_mode, con_id from v$database; 

NAME Multitenant Option OPEN_MODE CON_ID 
--------- -------------------------- -------------------- ------------- 
ORCL Regular 12c Database: READ WRITE 0

可見該數據庫是傳統的數據庫,不是cdb
下面我們把這個數據庫轉換成cdb
01:27:24 sys@orcl> select name from v$datafile; 

NAME 
---------------------------------------------------------------------------------------------------------------------------------- 
+DATA/ORCL/DATAFILE/system.354.874717421 
+DATA/ORCL/DATAFILE/undotbs2.352.874718065 
+DATA/ORCL/DATAFILE/sysaux.322.874717327 
+DATA/ORCL/DATAFILE/undotbs1.326.874717527 
+DATA/ORCL/DATAFILE/kiwi.328.874718845 
+DATA/ORCL/DATAFILE/users.329.874717527 

6 rows selected. 

Elapsed: 00:00:00.01 
01:27:33 sys@orcl> shutdown immediate; 
Database closed. 
Database dismounted. 
ORACLE instance shut down. 
01:28:46 sys@orcl> startup restrict mount exclusive; 
ORACLE instance started. 

Total System Global Area 2488635392 bytes 
Fixed Size 2291424 bytes 
Variable Size 721422624 bytes 
Database Buffers 1744830464 bytes 
Redo Buffers 20090880 bytes 
Database mounted.

01:29:11 sys@orcl> alter database open read only; 

Database altered. 

Elapsed: 00:00:04.42 
01:30:28 sys@orcl> begin 
01:32:27 2 dbms_pdb.describe(PDB_DESCR_FILE => '/u02/noncdb/orcl.xml'); 
01:32:27 3 end; 
01:32:27 4 /

create pluggable database orcl using '/u02/noncdb/orcl.xml' copy;

alter session set container=orcl;
在執行這個腳本轉換成pdb
@?/rdbms/admin/noncdb_to_pdb.sql

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved