Prepare your external Oracle database by using the provided the database preparation
scripts to help you streamline the process.
About this task
For more information about preparing your Oracle database for installation, see:
Procedure
- Install your Oracle database by using the provider's documentation.
- Run the
create-ts.sql
command to create the tablespaces.
Ensure that you update the DATAFILE path based on your Oracle installation.
- Create the database schema and user.
- Run the following command:
alter session set "_ORACLE_SCRIPT"=true;
- Then, run the
createuser.sql
command.
Ensure that you update the $dbuser$
and $dbpassword$
values
based on your Oracle installation.
- Set up SSL and extract the certificate.
- Run the following commands, substituting your Oracle installation directory:
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=/u01/app/oracle/product/19.0.0/dbhome_1/bin:$PATH
- Locate the following files, depending on your Oracle version:
For Oracle 19c:
Table 1. Oracle
19c
File name |
Path |
listener.ora |
$ORACLE_HOME/network/admin |
sqlnet.ora |
$ORACLE_HOME/network/admin |
xdbwallet |
/u01/app/oracle/admin/orcl/xdb_wallet |
For Oracle 21c:
Table 2. Oracle
21c
File name |
Path |
listener.ora |
/u01/app/oracle/homes/OraDB21Home1/network/admin |
sqlnet.ora |
/u01/app/oracle/homes/OraDB21Home1/network/admin |
xdbwallet |
/u01/app/oracle/homes/OraDB21Home1/admin/orcl/xdb_wallet |
- Update listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCPS)(HOST = <hostname>)(PORT = 5500))
)
)
SSL_VERSION = 1.2
SSL_CLIENT_AUTHENTICATION = FALSE
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/admin/orcl/xdb_wallet)
)
)
- Update sqlnet.ora:
SQLNET.AUTHENTICATION_SERVICES= (TCPS, NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES)
SSL_VERSION = 1.2
SSL_CLIENT_AUTHENTICATION = FALSE
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/admin/orcl/xdb_wallet)
)
)
- Restart Listener Control by running each command:
lsnrctl stop
lsnrctl start
lsnrctl status
Ensure that the listener shows that the services have started their instances and are in ready
state.
If the listener shows no services, run the following command:
dbstart $ORACLE_HOME
- Extract the certificate by running the following commands:
orapki wallet display -wallet /u01/app/oracle/admin/orcl/xdb_wallet
orapki wallet export -wallet /u01/app/oracle/admin/orcl/xdb_wallet -dn 'CN=orcl' -cert /home/oracle/CA.cert
cat /home/oracle/CA.cert
Sample lsnrctl status output