Starting with Oracle Database 12c Release 1, you can use the Oracle Multitenant option to configure and manage a multitenant environment. The multitenant architecture enables an Oracle Database to function as a multitenant container database (CDB) that includes zero, one, or many customer-created pluggable databases (PDBs). A PDB is a portable collection of schemas, schema objects, and nonschema objects.
This chapter describes the following:
Before you can create a database, the following prerequisites must be met:
A non-CDB is the traditional type of an Oracle database, which was supported in Oracle Database releases before 12c.
A non-CDB still exists in Oracle Database 12c Release 1.
You can create a non-CDB either automatically or manually. Oracle recommends that you use the automatic creation procedure outlined in the “Creating a Database Automatically” section. Instructions on how to create a traditional database manually are given in the “Creating a Database Manually” section.
This section describes the following topics:
Complete the following steps to create a database automatically:
Unless specified otherwise, $ORACINST.INSTALL.P.SUPER
generates and enters a batch job which:
Calls INSTALL.P.DBA
.
Creates the system
and sysaux
tablespace.
Creates the default permanent tablespace, temporary tablespace, and undo tablespace.
Creates the log files.
Initializes the database.
Runs CATALOG.SQL
.
Runs CATPROC.SQL
.
Installs the tables for online help messages.
Installs the DEMO
tables.
Changes the system passwords if necessary.
Calls the verification procedure.
When $ORACINST.INSTALL.P.SUPER
has completed, you should have an initialized, ready-to-use database, and a running Oracle Database instance. The results of the job are listed in the file, L.
sid
.INSSUP.SYSOUT
, where sid
is the system ID of the database that you just installed.
Oracle recommends that you use the automatic creation procedure outlined in "Creating a Database Automatically". The manual creation procedure performs the same steps as the automatic creation procedure. However, when you create a database manually, you can perform the steps at your own pace, and also choose which of the optional steps to perform, omit, or perform later.
This section describes the following topics:
After generating the DBA files, you must create the database. This section describes the procedure for creating the database:
Determine if you want to make any changes to parameters in the distributed initialization file, sid
.DBS.INIT.ORA
(where sid
is the system ID for the database). The SGA parameters may need to be adjusted to reflect memory limitations and the maximum number of users who can access the Oracle Database instance at one time. Use a BS2000 editor to make the modifications.
See Also:
Oracle Database Reference for more information about the initialization parameters
Modify the environment definition file, sid
.P.ORAENV
, according to your specific requirements. Remember that a number of variables are evaluated during startup only. If you modify such a variable in the ORAENV
file later on, then you may have to wait for the next startup for the changes to take effect.
Do not explicitly set the environment variable NLS_LANG
when you run Oracle supplied SQL scripts.
The character set in the ORAENV
variable NLS_LANG
, however, must not be changed when you run some of the delivered SQL scripts.
Remember that you must call the applicable sid
.P.ORAENV
procedure before calling SQL*Plus. To execute SQL*Plus, enter the following commands:
/START-EXECUTABLE (*LINK(ORALOAD),SQLPLUS)
* /NOLOG
SQL> CONNECT / AS SYSDBA
SQL> STARTUP NOMOUNT [PFILE=filename]
/NOLOG
omits being prompted for user name and password.
CONNECT
gives you a connection to an idle instance.
The last statement starts the Oracle Database instance.
If you want to use your own copy of the initialization file (sid
.DBS.INIT.ORA
), then use the PFILE=
filename
option, as illustrated in the previous command.
The following statement creates database and log files:
SQL> CREATE DATABASE...;
Note:
If you get an error before the first SQL>
prompt, then it may be caused by either a missing ORAENV
file (or ORASID
not set in the ORAENV
file), or sometimes by an address space conflict. For example, the address range you assigned to the kernel memory pool (KNL_BASE
) could be occupied by a subsystem.
Run the scripts necessary to build data dictionary views, synonyms, and PL/SQL packages. Run the following commands:
SQL> SPOOL filename
SQL> SET TERMOUT OFF
SQL> $ORACLE_HOME/rdbms/admin/catalog.sql
SQL> $ORACLE_HOME/rdbms/admin/catproc.sql
To install the Online Help facility, enter the following command:
/CALL-PROCEDURE $ORACINST.INSTALL.P.HELP,(
sid
[,SYSTEMPW=systempw])
To install demo tables, enter the following:
/CALL-PROCEDURE $ORACINST.INSTALL.P.DEMO,(
sid
[,SYSTEMPW=systempw])
To install sample schemas, enter the following:
/CALL-PROCEDURE $ORACINST.INSTALL.P.SAMPLES,(
sid
[,SYSTEMPW=systempw] [,SYSPW=syspw])
The procedure INSTALL.P.SAMPLES
installs the human resources (HR), order entry (OE), info exchange (IX), and sales history (SH) sample schemas with the default passwords. Product media (PM) is not supported.
Note:
By default, the password for the SYSTEM
user is MANAGER
and the password for the SYS
user is CHANGE_ON_INSTALL
. For security reasons, Oracle recommends that you change these passwords and the sample schema passwords immediately after installation.
To verify if the demonstration database was correctly created, enter the following:
/CALL-PROCEDURE $ORACINST.INSTALL.P.VERIFY,(
sid
[,SYSTEMPW=systempw])
If the demonstration database was correctly created, then you see messages like the following displayed on the screen:
*SCOTT'S TABLE EMP IS INSTALLED
Installing Oracle Text is summarized in the "Oracle Text" chapter of this book.
Installing Java is summarized in the "Java in the Database" chapter of this book.
A multitenant container database (CDB) is a single physical database that contains zero, one, or many user-created pluggable databases. A pluggable database (PDB) is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. A non-CDB is a traditional Oracle database that cannot contain PDBs.
Starting with Oracle Database 12c Release 1, you can create a multitenant container database (CDB).
The topics in this section describe how to create a CDB manually on Fujitsu BS2000/OSD. As creating a CDB involves Perl scripts, you must perform some steps in the POSIX environment. Perl is supported only in the POSIX environment of BS2000.
The following topics are discussed:
See Also:
Oracle Database Administrator’s Guide for more information about creating a CDBThe procedure to create a multitenant container database (CDB) is discussed in the following topics:
Determine if you want to make any changes to the parameters in the distributed initialization file, sid
.DBS.INIT.ORA
(where sid
is the system ID for the database). The SGA parameters may need to be adjusted to reflect memory limitations and the maximum number of users who can access the Oracle Database instance at one time. Use a BS2000 editor to make the modifications.
To create a CDB, set the value for the ENABLE_PLUGGABLE_DATABASE
initialization parameter in the sid.DBS.INIT.ORA
file as follows:
ENABLE_PLUGGABLE_DATABASE=TRUE
See Also:
Oracle Database Reference for an explanation of initialization parameters
Modify the environment definition file, sid
.P.ORAENV
, according to your specific requirements. Remember that a number of variables are evaluated during startup only. If you modify such a variable in the ORAENV
file later on, then you may have to wait for the next startup for the changes to take effect.
Do not explicitly set the environment variable NLS_LANG
when you run Oracle supplied SQL scripts.
The character set in the ORAENV
variable NLS_LANG
, however, must not be changed when you run some of the delivered SQL scripts.