91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle12C 多租戶管理

發布時間:2020-06-28 20:49:11 來源:網絡 閱讀:740 作者:PengChonggui 欄目:關系型數據庫

--進入cdb 
sqlplus /nolog 
conn sys/sys as dba 

--查看數據庫基本信息
select name,cdb from v$database;

--查看容器的相關信息
select con_id,name from v$containers;

--查看數據文件的路徑
select con_id,file_name from cdb_data_files order by 1;

--顯示當前連接容器信息
show con_id con_name user

--顯示所有pdb
show pdbs

--start和stop根容器

--啟動數據
--CDB
sqlplus / as sysdba
startup

--PDB(所有PDB)
alter pluggable database all open;
--啟動pdb1庫
alter pluggable database pdb1 open;

--關閉數據庫
--CDB
shutdown immediate

--pdb1
alter pluggable database pdb1 close;
alter pluggable database pdb1 close immediate;
--關閉所有pdb
alter pluggable database all close immediate;

--創建公用用戶(sys和system在可插拔中就是自動創建的公用用戶)
sqlplus / as sysdba
create user c#dba identified by alex;


--創建公用角色
sqlplus / as sysdba
create role c##dbaprivs container=all;

grant dba to c##dbaprivs container=all;

--公用角色給公用用戶
grant c##dbaprivs to c#dba container=all;

--切換容器
alter session set container=ehrpdb;
--切換回根容器
alter session set container=cdb$root;


--2創建可插拔數據庫
--2.1克隆種子容器
create pluggable database cpcdb
admin user cpcadm identified by  cpcadm
file_name_convert=('/oracle/app/oracle/oradata/edw/pdbseed','/oradata/edw/cpcdb/datafile/');


--2.2直接創建數據庫
CREATE PLUGGABLE DATABASE hrdb
ADMIN USER hrdba IDENTIFIED BY hrdba
STORAGE (MAXSIZE 100G MAX_SHARED_TEMP_SIZE 2G)
DEFAULT TABLESPACE hrdb DATAFILE '/oradata/EDW/hrdb/datafile/hrdb001.dbf' SIZE 512M AUTOEXTEND on next 8M maxsize 10G;

CREATE PLUGGABLE DATABASE cpcdb
ADMIN USER cpcdba IDENTIFIED BY cpcdba
STORAGE (MAXSIZE 100G MAX_SHARED_TEMP_SIZE 2G)
DEFAULT TABLESPACE tbscpc DATAFILE '/oradata/EDW/cpcdb/datafile/tbscpc001.dbf' SIZE 512M AUTOEXTEND on next 8M maxsize 10G;

--2.3創建數據案例


create pluggable database cpcdb
admin user cpcadm identified by  cpcadm
file_name_convert=('/oracle/app/oracle/oradata/edw/pdbseed','/oradata/edw/cpcdb/datafile/');

create pluggable database ncdb
admin user ncadm identified by  ncadm
file_name_convert=('/oradata/edw/pdbseed','/oradata/edw/ncdb/datafile/');


CREATE PLUGGABLE DATABASE ncdb
ADMIN USER ncdba IDENTIFIED BY ncdba
STORAGE (MAXSIZE 100G MAX_SHARED_TEMP_SIZE 2G);

--訪問ncdb的插拔數據庫
sqlplus sys/ncdba@oraerp:1521/ncdb as sysdba 

--關閉PDB數據庫
alter pluggable database ncdb close immediate;
alter pluggable database hrdb close immediate;
alter pluggable database cpcdb close immediate;
alter pluggable database edwpdb close immediate;
--刪除PDB數據庫 
DROP PLUGGABLE DATABASE ncdb INCLUDING DATAFILES; 
DROP PLUGGABLE DATABASE hrdb INCLUDING DATAFILES; 
DROP PLUGGABLE DATABASE cpcdb INCLUDING DATAFILES;
DROP PLUGGABLE DATABASE edwpdb INCLUDING DATAFILES; 

--創建pdb案例
--1、cpcdb
create pluggable database cpcdb
admin user cpcadm identified by  cpcadm
file_name_convert=('/oradata/edw/pdbseed/','/oradata/edw/cpcdb/');

--2、ncdb
create pluggable database ncdb
admin user ncadm identified by  ncadm
file_name_convert=('/oradata/edw/pdbseed/','/oradata/edw/ncdb/');


--3、hrdb
create pluggable database hrdb
admin user hradm identified by hradm
file_name_convert=('/oradata/edw/pdbseed/','/oradata/edw/hrdb/');

alter pluggable database all open;

--登錄cpcdb
$sqlplus sys/Oracleedw13@192.168.1.2:1531/cpcdb as sysdba

$sqlplus sys/OraEdw!23@192.168.1.5:1533/ncdb as sysdba --含有!需要單獨輸入密碼

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

乌拉特后旗| 怀安县| 都安| 大石桥市| 丰县| 高台县| 莎车县| 莱芜市| 丽水市| 特克斯县| 田东县| 涟水县| 祥云县| 孝义市| 汝南县| 云林县| 内黄县| 独山县| 商洛市| 北辰区| 新河县| 休宁县| 鹤壁市| 茌平县| 景德镇市| 泌阳县| 团风县| 永城市| 青岛市| 常山县| 太谷县| 名山县| 连江县| 明星| 湘阴县| 涟水县| 新乐市| 大悟县| 肥乡县| 夏津县| 绥江县|