[oracle@rac1 dbs]$
sqlplus "/as sysdba"
SQL*Plus: Release 12.1.0.1.0 Production on Mon Apr 25
13:44:46 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0
- 64bit Production
With the Partitioning, Real Application Clusters,
Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> show pdbs
SQL> select name,dbid,con_dbid,cdb,con_id from
v$database;
NAME
DBID CON_DBID CDB CON_ID
--------- ---------- ---------- --- ----------
TESTDB
2692150728 2692150728 NO
0
SQL>
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/TESTDB/DATAFILE/system.270.908822475
+DATA/TESTDB/DATAFILE/sysaux.269.908822371
+DATA/TESTDB/DATAFILE/undotbs1.272.908822551
+DATA/TESTDB/DATAFILE/users.271.908822551
SQL> !
[oracle@rac1 dbs]$ sqlplus -version
SQL*Plus: Release 12.1.0.1.0 Production
[oracle@rac1 dbs]$ exit
SQL> CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1
identified by pdb
DEFAULT TABLESPACE USERS
DATAFILE '+DATA/PDB1/DATAFILE/'
SIZE 250M AUTOEXTEND ON
FILE_NAME_CONVERT=(
+DATA/TESTDB/DATAFILE/',
'+DATA/PDB1/DATAFILE/');
2 3 4
5 6 7
CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified
by pdb
*
ERROR at line 1:
ORA-65090: operation only allowed in a container database
SQL> CREATE
PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified by pdb DEFAULT TABLESPACE
USERS DATAFILE '+DATA/PDB1/DATAFILE/'
2
FILE_NAME_CONVERT=('+DATA/TESTDB/DATAFILE/','+DATA/PDB1/DATAFILE/');
CREATE PLUGGABLE
DATABASE pdb1 ADMIN USER pdb1 identified by pdb DEFAULT TABLESPACE USERS
DATAFILE '+DATA/PDB1/DATAFILE/'
*
ERROR at line 1:
ORA-65090: operation only allowed in a container database
SQL> select cdb from v$database;
CDB
---
NO
===>It should be YES if it is CDB database.
"ENABLE_PLUGGABLE_DATABASE" should be true if it is CBD database. But, if we change the value as true in NON CDB database, We will get the below error."
"ENABLE_PLUGGABLE_DATABASE" should be true if it is CBD database. But, if we change the value as true in NON CDB database, We will get the below error."
SQL> show parameter ENABLE_PLUGGABLE_DATABASE
NAME TYPE VALUE
------------------------------------ -----------
------------------------------
enable_pluggable_database boolean FALSE
SQL> alter system set ENABLE_PLUGGABLE_DATABASE=true;
alter system set ENABLE_PLUGGABLE_DATABASE=true
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be
modified
SQL> alter system set ENABLE_PLUGGABLE_DATABASE=true
scope=spfile;
System altered.
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area
772472832 bytes
Fixed Size 2855328 bytes
Variable Size
310382176 bytes
Database Buffers
452984832 bytes
Redo Buffers 6250496 bytes
ORA-65101: container database set up incorrectly
SQL> alter system set ENABLE_PLUGGABLE_DATABASE=false
scope=spfile;
System altered.
SQL> shut immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL>
==>Change into FALSE and restart the database.
thanks man
ReplyDelete