root
user.
Directory Description Owner Group Permissions Mountpoint /opt/dbdata
Data root
root
0775
No /opt/dbdata/oradata
Oracle Database Files oracle
orainv
0775
Yes /opt/dbdata/fast_recovery_area
Oracle Fast Recovery Area oracle
orainv
0775
Yes
/opt/dbdata/oradata
)
is separate from the file system used by the operating system and the Oracle software./opt/dbdata/fast_recovery_area
)
is separate from the file system used by the operating system and the Oracle software..bash_profile
file is not setting the
ORACLE_SID environment variable. If it is setting ORACLE_SID, comment out or remove that line
from the file..bash_profile
file. However, if you are using a VNC (Virtual
Network Computing) desktop, you will need to kill your Xvnc server process on the DBMS host, and then
restart the Xvnc server.env
command and verify that the ORACLE_SID environment variable
is not defined.% lsnrctl status
If the listener is not running, start the listener by entering at the Unix prompt:
% lsnrctl start
% dbca
DBCA displays a series of screens for creating a multitenant database. The screens are described below.
Prompt Value Global database name CDB-name.domain-name SID (Oracle System Identifier) CDB-name (example: orcl
)Create as Container database Yes Use Local Undo tablespace for PDBs Yes Create an empty Container database No Create a Container database with one or more PDBs Yes Number of PDBs 1 PDB name PDB-name (example: lpak
)
Enter the global database name, the SID (Oracle System Identifier), and the PDB name in lowercase letters. Do not use uppercase letters.
Prompt Value Use template file for database storage attributes No Use following for the database storage attributes Yes Database files storage type File System Database files location /opt/dbdata/oradata/{DB_UNIQUE_NAME}
Use Oracle-Managed Files No
Prompt Value Specify Fast Recovery Area Yes Recovery files storage type File System Fast Recovery Area /opt/dbdata/fast_recovery_area/{DB_UNIQUE_NAME}
Fast Recovery Area size fast recovery area size Enable archiving No (See archiving instructions below)
If Enable archiving is selected, the Oracle database runs in ARCHIVELOG mode. If it is not selected, the Oracle database runs in NOARCHIVELOG mode.
In NOARCHIVELOG mode:In ARCHIVELOG mode:
- Archiving of the online redo log files is disabled.
- The Oracle database is protected from instance failure but not disk failure.
- Online backups cannot be performed.
- Archiving of the online redo log files is enabled.
- The Oracle database is protected from both instance and disk failure.
- Online backups can be performed.
- The archived redo log files are written to the fast recovery area.
If the Oracle database is intended for production data, it must be run in ARCHIVELOG mode to prevent data loss in the event of disk failure. (However, it is better to wait until after the database is created to enable ARCHIVELOG mode. See note below.)
If you are going to run your Oracle database in ARCHIVELOG mode, we recommend that you do not select the Enable archiving option on this screen. Instead, you should enable and configure ARCHIVELOG mode after the Oracle database has been created. Doing this keeps the database creation steps simpler.
Select the listener named LISTENER
. Do not create a new listener.
Component Name Select Component? Include in PDBs? Oracle JVM Yes Yes Oracle Text No No Oracle Multimedia No No Oracle OLAP No No Oracle Spatial No No Oracle Label Security No No Oracle Application Express No No Oracle Database Vault No No
Memory
- Select Use Manual Shared Memory Management.
LeasePak requires Manual Shared Memory Management. Do not use Automatic Shared Memory Management or Automatic Memory Management.
- Enter the memory pool sizes:
Memory Pool Minimum Size Shared pool size 1 GB
Buffer cache size 2 GB
Java pool size 128 MB
Large pool size 128 MB
PGA size 2 GB
Each of the above Oracle memory pools has a corresponding initialization parameter which determines its size. When you enter the size of a pool on the Memory tab, Oracle sets the initialization parameter of that pool to the entered size. The values of these initialization parameters can easily be changed anytime after the database has been created.
Refer to Initialization Parameters for guidelines on sizing the memory components.
Sizing
Prompt Value Block size 8192
bytesProcesses maximum number of processes When you enter the maximum number of processes on the Sizing tab, Oracle sets the PROCESSES initialization parameter to the entered number. Refer to Initialization Parameters for guidelines on setting the maximum number of processes.
The Oracle block size of 8192 bytes is a LeasePak requirement.
Character Sets
- Database Character Set:
- Select Choose from the list of character sets.
- Clear (do not select) the Show recommended character sets only check box.
- For the Database Character Set, select either WE8ISO8859P1 or AL32UTF8. Netsol recommends WE8ISO8859P1 as the database character set. LeasePak performs better with WE8ISO8859P1 than it does with AL32UTF8.
- Enter the following:
Prompt Value National character set AL16UTF16
Default language American
Default territory United States
WE8ISO8859P15 is not recommended for the database character set because it is not supported by Oracle Instant Client.
For the optimum performance of LeasePak software, do not choose AL32UTF8 as the database character set. LeasePak will run slower with AL32UTF8 due to the runtime conversion of characters.
LeasePak software can process only 7-bit ASCII characters. LeasePak cannot process 8-bit characters or multi-byte characters. Therefore, do not enter single-byte characters that use the 8th bit or multi-byte characters into LeasePak tables.
Connection Mode
Select Dedicated server mode.
LeasePak requires Oracle dedicated server connections. Do not use Oracle shared server connections with LeasePak.
Sample Schemas
Clear (do not select) the Add sample schemas to the database check box.
Specify passwords for the Oracle administrative accounts.
When entering the File Size on the following Customize Storage screens, specify the correct suffix
(such as "M Bytes" or "G Bytes") in the drop-down list. The DBCA default for the suffix
is inconsistent, and sometimes defaults to "K Bytes" (kilobytes), which is usually incorrect.
So always check the suffix when entering file sizes. You may need to manually change the suffix
in the drop-down list to "M Bytes" for megabytes or "G Bytes" for gigabytes.
File Name Path control01.ctl
/opt/dbdata/oradata/{DB_UNIQUE_NAME}/
control02.ctl
/opt/dbdata/fast_recovery_area/{DB_UNIQUE_NAME}/
Group # File Size Redo Log Member File Name 1
512
M Bytes/opt/dbdata/oradata/{DB_UNIQUE_NAME}/redo01.log
Group # File Size Redo Log Member File Name 2
512
M Bytes/opt/dbdata/oradata/{DB_UNIQUE_NAME}/redo02.log
Group # File Size Redo Log Member File Name 3
512
M Bytes/opt/dbdata/oradata/{DB_UNIQUE_NAME}/redo03.log
Group # File Size Redo Log Member File Name 4
512
M Bytes/opt/dbdata/oradata/{DB_UNIQUE_NAME}/redo04.log
The default Redo Log Member File Name for group 4 is incorrect:
{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/redo04.log
. Make sure to change the Redo Log Member File Name to:/opt/dbdata/oradata/{DB_UNIQUE_NAME}/redo04.log
.
After the database has been created and is in production, if online redo log file switches occur more than once every 20 to 30 minutes during periods of heavy activity (such as End of Period), increase the size of the online redo log files.
The instructions in this section create datafiles with a size of 4 GB in the SYSTEM, SYSAUX, UNDOTBS1, and TEMP tablespaces. A file size of 4 GB for these datafiles was selected as a generic size suitable for most databases. The 4 GB file size is recommended but not required.
Also, a 25 MB datafile is created in the USERS tablespace.
In the following instructions, you will be clicking on file names in the Datafiles section of the storage pane on the left. Before you can find a particular file name to click on, you may first have to horizontally scroll the storage pane in order to show the file names.
system01.dbf
file name
to display the Edit Datafile - system01.dbf screen on the right.
system01.dbf
file:
Tab Field Value General Name /opt/dbdata/oradata/{DB_UNIQUE_NAME}/system01.dbf
General File Size 4
G BytesOptions Automatically extend datafile when full (AUTOEXTEND) No
(Clear the check box so it is not selected.)
sysaux01.dbf
file name
to display the Edit Datafile - sysaux01.dbf screen on the right.
sysaux01.dbf
file:
Tab Field Value General Name /opt/dbdata/oradata/{DB_UNIQUE_NAME}/sysaux01.dbf
General File Size 4
G BytesOptions Automatically extend datafile when full (AUTOEXTEND) No
(Clear the check box so it is not selected.)
temp01.dbf
file name
to display the Edit Datafile - temp01.dbf screen on the right.
temp01.dbf
file:
Tab Field Value General Name /opt/dbdata/oradata/{DB_UNIQUE_NAME}/temp01.dbf
General File Size 4
G BytesOptions Automatically extend datafile when full (AUTOEXTEND) No
(Clear the check box so it is not selected.)
undotbs01.dbf
file name
to display the Edit Datafile - undotbs01.dbf screen on the right.
undotbs01.dbf
file:
Tab Field Value General Name /opt/dbdata/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf
General File Size 4
G BytesOptions Automatically extend datafile when full (AUTOEXTEND) No
(Clear the check box so it is not selected.)
users01.dbf
file name
to display the Edit Datafile - users01.dbf screen on the right.
users01.dbf
file:
Tab Field Value General Name /opt/dbdata/oradata/{DB_UNIQUE_NAME}/users01.dbf
General File Size 25
M BytesOptions Automatically extend datafile when full (AUTOEXTEND) No
(Clear the check box so it is not selected.)
Oracle creates tempfiles as sparse files. Sparse files are not fully allocated when they are created, and the Unix
df
(disk free) command does not show their full size. This can lead to overcommitting the resources of a filesystem, unless the full size of sparse files is manually accounted for when measuring the amount of free space in a filesystem.
Click the OK button at the bottom of the window to save your changes and exit the Customize Storage window.
There are two buttons at the bottom of the window: OK and Close. The Close button is mislabeled; it is actually a Cancel button. If you click Close on this particular window, it will discard your changes.
Define ORACLE_SID environment variable in Oracle software owner's .bash_profile
file
.bash_profile
file:
export ORACLE_SID=CDB-name
.bash_profile
file. However, if you are using a VNC (Virtual
Network Computing) desktop, you will need to kill your Xvnc server process on the DBMS host, and then
restart the Xvnc server.
Do not define the TWO_TASK environment variable in the Oracle software owner's
.bash_profile
file on the DBMS host. Instead, define ORACLE_SID as described above.
Connecting to Oracle with TWO_TASK requires the Oracle listener to be running, whereas connecting with ORACLE_SID can be done even if the listener is not running. The Oracle software owner on the DBMS host must be able to connect to Oracle whether or not the listener is running. Therefore, TWO_TASK should not be used by the Oracle software owner on the DBMS host.
TWO_TASK can be used by the Oracle software owner on the application host of a split system.
Set Oracle initialization parameters
There are a number of Oracle initialization parameters that need to be manually set. Refer to Initialization Parameters for instructions on setting the required and customizable Oracle initialization parameters.
Startup the Pluggable Database (PDB)
% sqlplus / as sysdba
SQL> alter session set container = CDB$ROOT;
SQL> show con_name
SQL> alter pluggable database PDB-name open;
Disable autoextend for the PDB datafiles and tempfile
% sqlplus / as sysdba
SQL> alter session set container = PDB-name;
SQL> show con_name
SQL> select TABLESPACE_NAME, FILE_NAME, AUTOEXTENSIBLE from dba_data_files; SQL> select TABLESPACE_NAME, FILE_NAME, AUTOEXTENSIBLE from dba_temp_files;
SQL> alter pluggable database datafile 'path-to-system01.dbf' AUTOEXTEND OFF; SQL> alter pluggable database datafile 'path-to-sysaux01.dbf' AUTOEXTEND OFF; SQL> alter pluggable database datafile 'path-to-undotbs01.dbf' AUTOEXTEND OFF; SQL> alter pluggable database datafile 'path-to-users01.dbf' AUTOEXTEND OFF; SQL> alter pluggable database tempfile 'path-to-temp01.dbf' AUTOEXTEND OFF;
Increase the size of the PDB datafiles and tempfile
% sqlplus / as sysdba
SQL> alter session set container = PDB-name;
SQL> show con_name
SQL> select TABLESPACE_NAME, FILE_NAME, BYTES / 1024 / 1024 as "Size in MB" from dba_data_files; SQL> select TABLESPACE_NAME, FILE_NAME, BYTES / 1024 / 1024 as "Size in MB" from dba_temp_files;
SQL> alter pluggable database datafile 'path-to-system01.dbf' RESIZE 4G; SQL> alter pluggable database datafile 'path-to-sysaux01.dbf' RESIZE 4G; SQL> alter pluggable database datafile 'path-to-undotbs01.dbf' RESIZE 4G; SQL> alter pluggable database datafile 'path-to-users01.dbf' RESIZE 25M; SQL> alter pluggable database tempfile 'path-to-temp01.dbf' RESIZE 4G;
If the size of temp01.dbf
is already 4 GB (4096 MB), skip the RESIZE of temp01.dbf
.
Add a Net Service Name for the PDB
Refer to Net Service Name Configuration for instructions
on adding a Net Service Name entry for the PDB to the Oracle tnsnames.ora
file.
Disable Automatic SQL Tuning Task
Unless you have purchased licenses for the Oracle Diagnostics Pack and the Oracle Tuning Pack, you must disable the Automatic SQL Tuning Task.
Perform the following instructions once for the CDB (after creating the multitenant database), once for the initial PDB (after creating the multitenant database), and once for each additionally created PDB (after creating additional PDBs).
% sqlplus / as sysdba
SQL> alter session set container = CDB$ROOT;
For a PDB: Change the current container to the PDB by entering at the sqlplus prompt:
SQL> alter session set container = PDB-name;
SQL> BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE (
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/
SQL> select client_name as task, status from dba_autotask_client;
Disable Automatic SQL Plan Management
In order to prevent performance problems with LeasePak, Oracle Automatic SQL Plan Management should be disabled.
Perform the following instructions once for the CDB (after creating the multitenant database), once for the initial PDB (after creating the multitenant database), and once for each additionally created PDB (after creating additional PDBs).
% sqlplus / as sysdba
SQL> alter session set container = CDB$ROOT;
For a PDB: Change the current container to the PDB by entering at the sqlplus prompt:
SQL> alter session set container = PDB-name;
SQL> BEGIN
DBMS_SPM.SET_EVOLVE_TASK_PARAMETER (
task_name => 'SYS_AUTO_SPM_EVOLVE_TASK',
parameter => 'ALTERNATE_PLAN_BASELINE',
value => '');
END;
/
SQL> BEGIN
DBMS_SPM.SET_EVOLVE_TASK_PARAMETER (
task_name => 'SYS_AUTO_SPM_EVOLVE_TASK',
parameter => 'ALTERNATE_PLAN_SOURCE',
value => '');
END;
/
Disable Optimizer Statistics Advisor automated maintenance task
There is a bug in Oracle 19c which causes the SYSAUX tablespace to run out of storage space. The workaround is to disable the Optimizer Statistics Advisor automated maintenance task for the CDB and each PDB.
Perform the following instructions once for the CDB (after creating the multitenant database), once for the initial PDB (after creating the multitenant database), and once for each additionally created PDB (after creating additional PDBs).
% sqlplus / as sysdba
SQL> alter session set container = CDB$ROOT;
For a PDB: Change the current container to the PDB by entering at the sqlplus prompt:
SQL> alter session set container = PDB-name;
SQL> DECLARE
filter1 CLOB;
BEGIN
filter1 := DBMS_STATS.CONFIGURE_ADVISOR_RULE_FILTER
('AUTO_STATS_ADVISOR_TASK', 'EXECUTE', NULL, 'DISABLE');
END;
/
Disable Automatic Segment Advisor Task
In order to prevent performance problems with LeasePak, the Oracle Automatic Segment Advisor Task should be disabled.
Perform the following instructions once for the CDB (after creating the multitenant database), once for the initial PDB (after creating the multitenant database), and once for each additionally created PDB (after creating additional PDBs).
% sqlplus / as sysdba
SQL> alter session set container = CDB$ROOT;
For a PDB: Change the current container to the PDB by entering at the sqlplus prompt:
SQL> alter session set container = PDB-name;
SQL> BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE (
client_name => 'auto space advisor',
operation => NULL,
window_name => NULL);
END;
/
SQL> select client_name as task, status from dba_autotask_client;
Disabling the Oracle Automatic Segment Advisor Task does not prevent you from manually running the Segment Advisor. You can still run the Segment Advisor manually whenever you like.
Configure automatic startup and shutdown of the Oracle instance
Refer to Instance Startup and Shutdown for instructions on how to configure:
- Automatic shutdown and startup of the Oracle instance and listener whenever the operating system is rebooted
- Automatic startup of the PDB whenever the Oracle instance is started
% dbca
DBCA displays a series of screens for creating an additional pluggable database:
- Database Operation
- Select "Manage Pluggable databases".
- Manage Pluggable Databases
- Select "Create a Pluggable database".
- Select Source Database
- Select the container database (CDB) within which to create the pluggable database.
- Create Pluggable Database
- Select "Create a new Pluggable database from another PDB" (PDB$SEED).
- Pluggable Database Identification
- Pluggable database name: enter the PDB name in lowercase letters
- Administrator user name:
PDBADMIN
- Pluggable Database Options
- Storage type:
File System
- Database location: accept the default value
- Create default user tablespace:
Yes
(select the check box)- Summary
- Review the summary of the pending pluggable database creation.
- Click Finish to begin the creation of the pluggable database.
- Make note of the DBCA log location and Alert log location as displayed on the Progress screen.
- If any errors occur during the creation of the pluggable database, check the DBCA log and Alert log for further diagnostics.
- When the PDB creation is complete, DBCA displays a message that the PDB has been plugged successfully.