Forum Stats

  • 3,875,222 Users
  • 2,266,892 Discussions
  • 7,912,116 Comments

Discussions

12c database - empty container vs PDB

John-MK
John-MK Member Posts: 324 Blue Ribbon
edited Jul 29, 2014 12:28PM in Multitenant

Hello,

I have created 12.1.0.1 single instance with EMPTY CONTAINER Database on RHL6. Now, as soon as I started creating users, I am getting errors which tells. COMMONS USERS or LOCAL USERS in the PDB.

I have no experience on 12.c yet, and thats why I am confused here what to do. Because there is no such requirement for taking advantage of PDBs. I thought of upgrading myself but it seems its telling me I am 12c :-)

Now I am just thinking how to proceed: Options according to my weak 12c understanding are:

- Convert this empty container database back to NON-Container or Standard (at least I know the administration) ?, By the way is it possible to convert container database to non-container one?

- Create a Pluggable database in this container db?

My confusion is that this empty container database is created successfully, can't I use this itself as a independent database? I dont want to create PDB at the moment (may be in coming time).

I mean I chose the EMPTY CONTAINER DATABASE so that I do not need to convert NON-CONTAINER db to container and so on.

Please suggest me what you think, how should I proceed.

Bundle of thanks.

Kind regards

Tagged:
John-MK

Answers

  • orawiss
    orawiss Member Posts: 2,760 Silver Trophy

    I believe you are talking about common user , which a database user known in the container and all PDBs


    "In a multitenant environment, a common user is a database user whose identity and password are known in the root and in every existing and future pluggable database (PDB). Common users can connect to the root and perform operations. If the common user has the appropriate privileges, then this user can perform operations in PDBs as well, such as granting privileges to local users."

    references: Managing Security for Oracle Database Users


    I guess you got the error when you wanted to create a common user , because the user name must start with C## or c##

    I guess also you are testing 12c, why just create a PDB; you have many options;

    1- Create a Pluggable Database (PDB) using the DBCA.

    2- Creation of a PDB from Seed , Manual using SQL*Plus

    3- Using SQL Developer

    4- Using OEM

    Read the following:

    Introduction to the Multitenant Architecture



    John-MK
  • Srini Chavali-Oracle
    Srini Chavali-Oracle Member Posts: 29,596 Employee

    There is a very significant architectural change in 12c with PDB and CDB - you will need to read up on the docs as this change will force you to unlearn and relearn a few concepts.

    Having said that, using this architecture is optional - that is, a 'standard' non-multitenant database can be created in 12c - it looks like you did not choose this option when creating your database. Check docs on how to do so.

    HTH
    Srini

  • John-MK
    John-MK Member Posts: 324 Blue Ribbon

    Hello,

    Thanks a lot for the reply.

    Yes, common user/local user was the first thing I did, and noticed c## kind of changes as you mentioned and I saw already with DBCA to create PDB(s) , plugging, unplugging, etc. during dbca itself.

    Still my doubt is standing there as I definitely have very little knowledge of 12c architecture ( I need to study though, and I will) but as I mentioned that my requirement at the moment is not that big or using PDBs, CONDBs, etc.

    I created empty container database by just assuming I would say that It will be like a standalone database or so, but actually it is a EMPTY CDB and I can add PDBS to this container, but perhaps it will make things a bit complicated for me.

    Now I am thinking that DROP THIS DB, create a NON-CONDB at the moment, and in future I can convert NON-CONDB to CON-DB if required (As I found that ppl convert in this way and its not difficult to do so).

    Kind regards,

  • I have created 12.1.0.1 single instance with EMPTY CONTAINER Database on RHL6.
    

    What does 'empty container' database mean to you?

    With 12c you either create a container database (which includes a CDB and one or more PDBs) or you create a non-container database.

     Now, as soon as I started creating users, I am getting errors which tells. COMMONS USERS or LOCAL USERS in the PDB.

    Which means you created a container database and you are trying to create local users in the ROOT/CDB container which is NOT allowed.

    I have no experience on 12.c yet, and thats why I am confused here what to do. Because there is no such requirement for taking advantage of PDBs. I thought of upgrading myself but it seems its telling me I am 12c :-)
    

    Then you should start over and create a non-container database - that will be equivalent to the 11g and previous DB versions.

    Your question/problem has been answered MANY times already in this forum and others and stems from having failed to first read the documentation.

    Introduction to the Multitenant Architecture

    Read my replies in several threads in the forums starting with this one:

    12c: ORA-65049: creation of local user or role is not allowed in CDB$ROOT

    You are getting that exception because the 'creation of local user or role is not allowed in CDB$ROOT'. 
    
    Let me be the first to say, as regards 12c, RTFM!
    http://www.oracle.com/pls/db121/homepage
    I suggest you first read chapters 17 and 18 of the Concepts doc about the new multitenant architecture of 12c.
    http://docs.oracle.com/cd/E16655_01/server.121/e17633/part_consol.htm#CHDGDBHJ
    
    The 'Common Users in a CDB section answers your question
    
    . . .

    For anyone just getting started with 12c and using containers please: RTFM!

    See my replies in these other threads for additional info

    https://forums.oracle.com/thread/2554568

    How to connect to the human_resources schemas in 12c?

    The word 'you' in the following comments are meant for ANYONE that intends to start working with 12c.

    You will NOT be successful working with 12c unless you have read and understand the new multitenant architecture that it uses. There are very simple things (connecting, startup/shutdown, creation of users, grants to users, etc) that just don't work the same old way anymore.

    If you try to just 'plow through it' without reading about it you will likely get an exception that you won't understand and it will likely use a term (CDB$ROOT) that you won't understand. Then you will hunt all over (or worse, ask in the forums) to find out about that term.

    You will find it MUCH simpler if you just start  with the documentation to begin with.

    John-MK
  • John-MK
    John-MK Member Posts: 324 Blue Ribbon

    Hello,

    Thanks a lot for your time.

    The problem was not creating user in the container or locally. I had read that in a flash, rather than asking the question here. I was asking overall structural wise. I mentioned already that I must read 12c for the future. I was just in a hurry to create 12c db.

    This is what I was confused about when you said:

    > With 12c you either create a container database (which includes a CDB and one or more PDBs) or you create a non-container database.

    That means when you created empty container database, you should also create at least one PDB.

    I appreciate your effort.

    Kind regards,

  • That means when you created empty container database, you should also create at least one PDB.

    No - you don't need to create a PDB at the same time you create the container DB.

    You can create PDBs later. You can clone the SEED PDB or you can convert a standard DB (e.g. an 11g database) to a PDB.

    But, yes, as a user it is a PDB that you use for the database. You generally do NOT create applications in the CDB itself.

     I mentioned already that I must read 12c for the future. I was just in a hurry to create 12c db.

    That is certainly your choice. But I would again caution you that is the WRONG order to do things with 12c.

    There are some things that can either NOT be undone at all if you make a mistake, or can't be undone easily. You will have a lot less grief and wasted effort if you become familiar with the architecture first.

    Using a VM environment for your playground is even more useful with 12c than it was in the past. It makes it a lot easier to try different things and save the interim versions.

    Check out the 'Oracle Big Data Lite VM' that contains pre-built modules for Linux, 12c, Data Integrator, Hadoop and others.

    VirtualBox VMs for Developers

    Good luck with your project.

This discussion has been closed.