0% found this document useful (0 votes)
4 views4 pages

Create Pdb Cdb

A new pluggable database named 'studentspdb' was created manually using the seed database with an admin user 'studentsadm'. The database was configured with a default tablespace and datafile settings, and was subsequently opened for use. The document also shows the directory structure and datafiles associated with the newly created pluggable database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Create Pdb Cdb

A new pluggable database named 'studentspdb' was created manually using the seed database with an admin user 'studentsadm'. The database was configured with a default tablespace and datafile settings, and was subsequently opened for use. The document also shows the directory structure and datafiles associated with the newly created pluggable database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CREATE PLUGGABLE DATABASE MANUALLY USING SEED:

SQL>
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB MOUNTED
4 PDB1 READ WRITE NO
6 SALESPDB READ WRITE NO

SQL>

CON_NAME

------------------------------

CDB$ROOT

SQL>

CON_ID NAME OPEN_MODE APP


PDB_COUNT

---------- ------------------------------------------------------- ---------- ---


----------

1 CDB$ROOT READ WRITE NO


3

2 PDB$SEED READ ONLY NO


0

3 ORCLPDB MOUNTED NO
0

4 PDB1 READ WRITE NO


0

6 SALESPDB READ WRITE NO


0

SQL>

NAME OPEN_MODE LOG_MODE DATABASE_ROLE

------------------------------------------------------- -------------------- ------------ ----------------

ORCL READ WRITE ARCHIVELOG PRIMARY

SQL>
SQL> CREATE PLUGGABLE DATABASE studentspdb

ADMIN USER studentsadm IDENTIFIED BY password

ROLES = (dba)

DEFAULT TABLESPACE students

DATAFILE '/u02/app/oracle/oradata/ORCL/studentspdb/students01.dbf' SIZE 250M AUTOEXTEND


ON

FILE_NAME_CONVERT = ('/u02/app/oracle/oradata/ORCL/pdbseed/',

'/u02/app/oracle/oradata/ORCL/studentspdb/')

STORAGE (MAXSIZE 2G)

PATH_PREFIX = '/u02/app/oracle/oradata/ORCL/studentspdb';

2 3 4 5 6 7 8 9

Pluggable database created.


SQL> SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED READ ONLY NO

3 ORCLPDB MOUNTED

4 PDB1 READ WRITE NO

6 SALESPDB READ WRITE NO

7 STUDENTSPDB MOUNTED

SQL> alter pluggable database STUDENTSPDB open;

Pluggable database altered.

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED READ ONLY NO

3 ORCLPDB MOUNTED

4 PDB1 READ WRITE NO

6 SALESPDB READ WRITE NO

7 STUDENTSPDB READ WRITE NO

SQL> !

[oracle@oracle studentspdb]$ pwd

/u02/app/oracle/oradata/ORCL/studentspdb

[oracle@oracle studentspdb]$ ls -ltrha

total 1.5G

drwxr-x---. 7 oracle oinstall 4.0K Apr 5 19:32 ..

-rw-r-----. 1 oracle oinstall 316M Apr 5 19:40 undotbs01.dbf

-rw-r-----. 1 oracle oinstall 446M Apr 5 19:40 sysaux01.dbf

-rw-r-----. 1 oracle oinstall 441M Apr 5 19:40 system01.dbf


drwxr-xr-x. 2 oracle oinstall 107 Apr 5 19:40 .

-rw-r-----. 1 oracle oinstall 251M Apr 5 19:40 students01.dbf

-rw-r-----. 1 oracle oinstall 21M Apr 5 19:40 temp01.dbf

[oracle@oracle studentspdb]$ exit

exit

SQL> select name from v$datafile where con_id=7;

NAME

-------------------------------------------------------

/u02/app/oracle/oradata/ORCL/studentspdb/system01.dbf

/u02/app/oracle/oradata/ORCL/studentspdb/sysaux01.dbf

/u02/app/oracle/oradata/ORCL/studentspdb/undotbs01.dbf

/u02/app/oracle/oradata/ORCL/studentspdb/students01.dbf

SQL>

SQL>

You might also like