Many of the following chapters of our course rely on a PDB called demo_pdb. You will have to create this PDB if you want to follow along some of the hands-on chapters of this course. Learn to perform the steps required to create the DEMO_PDB PDB as well as the demo_pdb_admin user which we will use in the next chapters of our course.
- [Instructor] Before we can continue with the next chapters of our course, there's one thing we have to do first. In many of the following chapters, we will rely on a demo Oracle 12c pluggable database that we will use for our exercises. We have to create this Demo PDB first so let's take a moment and create it so that we can set up our environment correctly for some of the exciting hands on demos in the remaining parts of the course.
Let's start by opening a terminal window and connecting to the root container of our CDB as the sys DBA user. Sqlplus as sysdba. Now, let's create a pluggable database which we'll call, being very creative, demo_pdb. You can find the sample create pluggable database command included in your exercise file.
Let's copy this command and paste it inside our SQL Plus window. As part of the Demo PDB creation, we are also creating a demo_pdb_admin administrator user with a password of password. We will use this username throughout the course. Also, please remember to change the path of the Oracle data directories from what is provided in my create pluggable database command, which is /oradata if your Oracle data directory is different.
Also, if you are using Oracle managed files, which can be determined by looking at the system parameter db_create_file_dest, if that parameter is configured, then you won't need to specify a data file location and a file name convert parameter in your create pluggable database command. You can omit those otherwise you will get an error.
In my environment, we can see that db_create_file_dest the parameter is not configured and thus I have to use the file name convert parameter and specify an explicit location for the datafile of my table space. Also, we can see that the create pluggable database command has been successfully executed. Now let's open our Demo PDB. alter pluggable database demo_pdb open.
Let's grant the demo_pdb_adminuser we just created quota on the my_tbs tablespace which you also created during the Demo PDB creation screen. We'll need to do that so that this user will be able to create tables in the pdb default table space. In order to do that, let's switch to our newly created PDB alter session set conatiner=demo_pdb and give the grant.
grant unlimited tablespace to demo_pdb_admin. There you have it, that's it! We are now ready for the next chapters in our course. You can exit this SQL Plus session.
- Pluggable databases (PDB)
- Enabling the new multitenant container database (CDB) architecture
- Connecting to the CDB
- Creating a new PDB
- Unplugging and cloning a PDB
- Backing up and restoring a PDB using RMAN
- Using the new In-Memory Column Store
- Using improved default column values
- Enabling and using extended 32K VARCHARs
- Exploring improved Top-N queries
- Using Oracle temporary undo
- New database partitioning features
- Using adaptive execution plans
- Restoring a table to a specific point in time using RMAN