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
Select Advanced Mode option and click Next
Select “General Purpose or Transaction Processing” option and click Next
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.
Check “Configure Enterprise Manager (EM) Database Express” option and click Next
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.
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.
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
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
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
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.
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
After some 10 to 15 minutes it will show a Completed Successfully message
And it will show the important information as shown below
Click Exit and then Close. Database is now created. You can open the terminal window and verify the files created.
Now let us connect to CDB database using SQLPlus.
First set the environment variable ORACLE_SID to ica
To view the current container give the “Show Con_name” command.
To connect to Pluggable database give the following command
alter session set container=pdb1
0 comments:
Post a Comment