Chinaunix首页 | 论坛 | 博客
  • 博客访问: 809766
  • 博文数量: 199
  • 博客积分: 6363
  • 博客等级: 准将
  • 技术积分: 2225
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-28 10:01
个人简介

来自农村的老实娃

文章分类

全部博文(199)

文章存档

2017年(1)

2014年(2)

2013年(3)

2012年(6)

2011年(26)

2010年(34)

2009年(50)

2008年(44)

2007年(33)

我的朋友

分类: Oracle

2013-10-10 10:33:56

Oracle 12c: ORA-65090: operation only allowed in a container database

Created the database using DBCA then tried to create a pluggable database by issuing the following command:

SQL> CREATE PLUGGABLE DATABASE dyx_db ADMIN USER dyx IDENTIFIED BY dyx
  2   STORAGE (MAXSIZE 2G MAX_SHARED_TEMP_SIZE 100M)
  3   DEFAULT TABLESPACE dyx
  4    DATAFILE '/u01/oracle/oradata/dyx_pdb/dyx.dbf' SIZE 25M AUTOEXTEND ON
  5    PATH_PREFIX = '/u01/oracle/oradata/dyx_pdb/'
  6    FILE_NAME_CONVERT = ('/u01/oracle/oradata/pdbseed/',  '/u01/oracle/oradata/dyx_pdb/');
CREATE PLUGGABLE DATABASE dyx_db ADMIN USER dyx IDENTIFIED BY dyx
                          *
ERROR at line 1:
ORA-65090: operation only allowed in a container database

Cause

Now before you can create a pluggable database, there are some prerequisites. The most important one is that you have to create the database with the “ENABLE PLUGGABLE DATABASE” clause ():

To create a CDB, the CREATE DATABASE statement must include the ENABLE PLUGGABLE DATABASE clause. When this clause is included, the statement creates a CDB with the root and the seed.

When the ENABLE PLUGGABLE DATABASE clause is not included in the CREATE DATABASE statement, the newly created database is a non-CDB. The statement does not create the root and the seed, and the non-CDB can never contain PDBs.

If you did not specify the above clause, you will not be able to create a PDB. Also, make sure the ENABLE_PLUGGABLE_DATABASE initialization parameter is set to “TRUE”. To find out wherever a database was created as a Container Database, check the v$database dynamic performance view:

SQL> select cdb from v$database;

CDB
---
NO

1 row selected.

SQL>

Resolution

1. Re-create DataBase with sqlplus with "ENABLE_PLUGGABLE_DATABASE " initialization parameter to TRUE in your SPFILE,  Such as:
CREATE DATABASE kdb121 ....
        ENABLE PLUGGABLE DATABASE
        .....; Note: After the creation of the database and creation of the catalog (Important: Run the catalog.sql, catproc.sql and pupbld.sql script  provided by Oracle) 

2. Re-create DataBase with DBCA with "Create a Empty Container Database" Auch as below:



we can check if the database was indeed created as a CDB:

SQL> select cdb from v$database;

CDB
---
YES
Tags: , , , , , , , ,
阅读(13034) | 评论(0) | 转发(0) |
0

上一篇:oracle 12c 发布了

下一篇:Data Pump工具

给主人留下些什么吧!~~