Create Pluggable Database(PDB) in Oracle 12c
..
Create Pluggable Database(PDB) in Oracle 12c
if required!!!
alter system set "_exclude_seed_cdb_view"=FALSE scope=both;
System altered.
select distinct substr(name, 1, instr(name, '/',-1)) PATH
from (
select name from v$datafile
union all
select NAME from v$controlfile
union all
select MEMBER name from v$logfile
union all
select name from v$tempfile
) order by 1;
take seed database file path
set linesize 400
col datafile_name for a90
col container for a20
select hxfil file#, d.name datafile_name , c.name container, fhsta fh_status, fhscn fh_scn, fhrba_seq fh_seq , fhafs fh_abs from x$kcvfh x, v$datafile d, v$containers c
where d.file# = x.hxfil
and d.con_id = c.con_id
and c.name='PDB$SEED'
order by c.name,fhscn;
FILE# DATAFILE_NAME CONTAINER FH_STATUS FH_SCN FH_SEQ FH_ABS
---------- ------------------------------------------------------------------------------------------ -------------------- ---------- -------------------- ---------- --------------------
14 +DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/system.359.1133670139 PDB$SEED 40960 52755005 2043 0
15 +DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/sysaux.1322.1133670139 PDB$SEED 32768 52755005 2043 0
20 +DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/pdb9_undotbs.4153.1133670139 PDB$SEED 32768 52755005 2043 0
17 +DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/users.1419.1133670139 PDB$SEED 32768 52755005 2043 0
16 +DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/undotbs1.1320.1133670139 PDB$SEED 32768 52755005 2043 0
for temp file alter session set container=PDB$SEED ;
select NAME from V$TEMPFILE;
NAME
------------------------------------------------------------------------------------------
+DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/TEMPFILE/temp.4195.1133671127
ww
create pluggable database anujy admin user vihaan identified by vihaan123
default tablespace anujy datafile '+DATA' size 250m autoextend on
file_name_convert=('+DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/','+DATA','+DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/TEMPFILE/temp.4195.1133671127','+DATA');
Pluggable database created.
create pluggable database anujz admin user vihaan identified by vihaan123
default tablespace anujy datafile '+DATA' size 250m autoextend on
file_name_convert=('+DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/DATAFILE/','+DATA','+DATA/VIHCDBD8/ABBFB3354CCC218FE05324F56A40A88A/TEMPFILE/temp.4195.1133671127','+DATA');
Pluggable database created.
No comments:
Post a Comment