Creating Oracle Container Database in 12c using DBCA

«« Previous
Next »»

Creating a Container Database using DBCA

For Creating a Container Database using SQL Statements Please click here

Let’s us create a container database by name ICA and one pluggable database PDB1.

We will place all datafiles, logfiles,controlfile of CDB in /u02/oracle/ica directory and place seed database pdbseed database datafiles in ‘/u02/oracle/ica/pdbseed’ directory and pluggable database PDB1 files /u02/oracle/ica/pdb1 directory

Step 1: Make directories

$mkdir /u02/oracle/ica
$cd /u02/oracle/ica
$mkdir pdb1

Step 2. Start DBCA

Grant access to X-Windows by typing following command as root

#xhost +

Start DBCA as Oracle User

$ dbca

Choose "Create Database" option and click "Next" button

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Enter or edit the given options like Files Location, Administrative Password etc and click Next

Select Advanced Mode option and click Next

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Select “General Purpose or Transaction Processing” option and click Next

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

In this screen enter the following values

Global Database Name: ica
SID : ica

Select “Create As a Container database” option and enter Pluggable Database Name as pdb1

Click Next.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Check “Configure Enterprise Manager (EM) Database Express” option and click Next

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Select “Use the Same Administrative Password for all Accounts” option and enter the common password as anything

you like. Here we will choose password as “Oracle” enter this value in Password and

Confirm password fields and click Next.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

DBCA will now ask you to select a Listener. Since the listener was already configured during installation we will

select the default Listener and click Next.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Then you will be shown a “Storage Locations” screen as shown above.

In this screen Select “Use Common Location for all Database Files” option and enter “/u02/oracle”

in the Database File Locations field.

Check the “Specify Fast Recovery Area” option and enter “/u02/oracle/fast_recovery_area”

in he Fast Recovery Area field

Click Next

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

You will be asked whether to install Sample Schemas. If you want it check the “Sample Schemas” checkbox.

Remember installing schemas will create a tablespace by name “Example” and will require another 150M.

Click Next

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

You will now be asked to enter Memory Size (SGA and PGA).

Adjust the memory size to your requirement and available memory.

It’s better to accept the default memory size.

Here I have allocated 552M for “SGA and PGA”

Select the “Use Automatic Memory Management” option and click next.

Then you will be shown the following screen

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Select “Create Database” option and click Next.

On clicking Next button you will be shown the Create Database summary page  where DBCA will show all the settings which you have specified in the previous screens and other settings.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Click Finish

It will take some 10 to 15 minutes to complete the database creation and you will be shown a progress bar as shown in the picture below

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

After some 10 to 15 minutes it will show a Completed Successfully message

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

And it will show the important information as shown below

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Click Exit and then Close. Database is now created. You can open the terminal window and verify the files created.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

Now let us connect to CDB database using SQLPlus.

First set the environment variable ORACLE_SID to ica

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

To view the current container give the “Show Con_name” command.

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

To connect to Pluggable database give the following command

alter session set container=pdb1

Database in 12c, Oracle Database Study Materials, Oracle Database Learning

«« Previous
Next »»

0 comments:

Post a Comment