How to install Oracle Database Examples

Download Oracle Database Examples from here , this example is 21c version, the size is nearly 800MB:

$ ls -lh /vagrant/LINUX.X64_213000_examples.zip
-rwxrwxrwx. 1 vagrant vagrant 796M Dec 30 10:37 /vagrant/LINUX.X64_213000_examples.zip

21c的Database Examples Installation Guide

Unzip:

cd ~oracle
unzip /vagrant/LINUX.X64_213000_examples.zip -d .

1.1GB after pressurization:

$ cd examples/
$ du -sh .
1.1G    .

In fact, the documentation also mentions:

1.1 GB of free disk space on UNIX systems.

View the unzipped file:

$ ls -l
total 20
drwxr-xr-x.  4 oracle oinstall  191 Jul 28  2021 install
drwxrwxr-x.  2 oracle oinstall   34 Jul 28  2021 response
-rwxr-xr-x.  1 oracle oinstall 8854 Jul 28  2021 runInstaller
drwxr-xr-x. 13 oracle oinstall 4096 Jul 28  2021 stage
-rwxrwxr-x.  1 oracle oinstall  500 Feb  7  2013 welcome.html

There are response files in the response directory:

$ cat response/*.rsp


###############################################################################
## Copyright(c) Oracle Corporation 1998,2021. All rights reserved.           ##
##                                                                           ##
## Specify values for the variables listed below to customize                ##
## your installation.                                                        ##
##                                                                           ##
## Each variable is associated with a comment. The comment                   ##
## can help to populate the variables with the appropriate                   ##
## values.                                                                   ##
##                                                                           ##
###############################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_demosinstall_response_schema_v21.0.0

#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=

#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
#-------------------------------------------------------------------------------
ORACLE_HOME=

#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=

Get these parameters:

$ orabase
/opt/oracle

$ echo $ORACLE_HOME
/opt/oracle/product/21c/dbhome_1

$ id -gn oracle
oinstall

The modified response file is as follows:

oracle.install.responseFileVersion=/oracle/install/rspfmt_demosinstall_response_schema_v21.0.0
UNIX_GROUP_NAME=oinstall
ORACLE_HOME=/opt/oracle/product/21c/dbhome_1
ORACLE_BASE=/opt/oracle

silent installation. Note that -responseFile must be an absolute path:

$ ./runInstaller -silent -responseFile /home/oracle/examples/response/examples_install.rsp

The log is as follows:

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 415 MB.   Actual 16478 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4083 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2023-01-03_10-13-10PM. Please wait ...[oracle@oracle-21c-vagrant examples]$ The response file for this session can be found at:
 /opt/oracle/product/21c/dbhome_1/install/response/examples_2023-01-03_10-13-10PM.rsp

You can find the log of this install session at:
 /opt/oraInventory/logs/installActions2023-01-03_10-13-10PM.log
Successfully Setup Software.
The installation of Oracle Database 21c Examples was successful.
Please check '/opt/oraInventory/logs/silentInstall2023-01-03_10-13-10PM.log' for more details.

The installed Example is located in the $ORACLE_HOME/rdbms/demo directory.
But this directory is small with 343 files:

$ du -sh $ORACLE_HOME/rdbms/demo
6.1M    /opt/oracle/product/21c/dbhome_1/rdbms/demo

So it should not be limited to the above directories:

$ cd $ORACLE_HOME
$ find . -name demo -type d -exec ls -ld {
    
    } \;
drwxr-x---. 5 oracle oinstall 12288 Jan  3 22:49 ./rdbms/demo
drwxr-xr-x. 3 oracle oinstall 61 Jan  3 22:13 ./ldap/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan  3 22:40 ./plsql/demo
drwxr-xr-x. 2 oracle oinstall 270 Jul 28  2021 ./sdk/demo
drwxr-xr-x. 2 oracle oinstall 45 Jan  3 22:38 ./sqlplus/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan  3 22:13 ./sqlj/demo
drwxr-xr-x. 5 oracle oinstall 44 Jan  3 22:13 ./precomp/demo
drwxr-x---. 5 oracle oinstall 38 Jan  3 22:13 ./xdk/demo
drwxr-xr-x. 3 oracle oinstall 60 Jan  3 22:13 ./nls/gdk/demo
drwxr-xr-x. 2 oracle oinstall 98 Jan  3 22:13 ./nls/demo
drwxr-xr-x. 14 oracle oinstall 249 Jan  3 22:13 ./md/demo
drwxr-xr-x. 3 oracle oinstall 19 Jan  3 22:13 ./odbc/demo
drwxr-xr-x. 3 oracle oinstall 20 Jul 28  2021 ./demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan  3 22:13 ./jpub/demo

All of them Jan 3are newly installed.

In section 1.2.2 of the documentation: Required Products,

Explains the products that are required to use Oracle Database Examples.
Before you can use the Oracle Database Examples, you must install the sample schemas in an Oracle Database. When you install Oracle Database, or use Database Configuration Assistant to create a database, you can choose to include the sample schemas. You can also manually install the sample schemas in an existing database.

This shows that some Database Examples also rely on Oracle Sample Schema.

There are also some Database Examples that can be installed through the following GitHub projects, such as Data Mining:

  • https://github.com/oracle/oracle-db-examples

In Chapter 7 of the document Database Administrator's Reference for Linux and UNIX System-Based Operating Systems : SQL Loader and PL/SQL Demonstrations, SQL Loader Demonstrations and PL/SQL Demonstrations are mentioned .

Section 6.3.1 talks about Pro*C/C++ Demonstration Programs. Other languages, such as FORTRAN, OCI, OCCI are also described.

Section 7.13 SQL*Loader Case Studies of the document Oracle® Database Database Utilities has a detailed description of the SQL Loader example.

Replenish

On January 10, 2023, another experiment was conducted in a 19c environment. The main takeaway is 2 points.

The first point is to confirm that the size of the installation is indeed about 1G, and I was a little skeptical before. The second is to determine the directory of the new installation file.

The first point is compared by running df before and after installation, the difference is 1G:

$ diff /tmp/1 /tmp/2
8c8
< /dev/sda4       200G   25G  165G  14% /u01
---
> /dev/sda4       200G   26G  164G  14% /u01

Point 2 is also compared by running the following commands before and after installation:

cd $ORACLE_HOME
find . -name demo -type d -exec ls -ld {
    
    } \;

Output before installation:

drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/21.2/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.0/demo
drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/21.1/demo
drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/22.1/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/demo
drwxr-xr-x. 2 oracle oinstall 4096 Apr 17  2019 ./sdk/demo
drwxr-x---. 3 oracle oinstall 4096 Apr 17  2019 ./inventory/Templates/demo
drwxr-xr-x. 3 oracle oinstall 4096 Apr 17  2019 ./demo

Output after installation:

drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./nls/gdk/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./nls/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./sqlj/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./plsql/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./sqlplus/demo
drwxr-xr-x. 13 oracle oinstall 4096 Jan 10 06:49 ./md/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./jpub/demo
drwxr-x---. 5 oracle oinstall 4096 Jan 10 06:49 ./xdk/demo
drwxr-xr-x. 5 oracle oinstall 4096 Jan 10 06:49 ./precomp/demo
drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/21.2/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.4/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.1/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.6/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.2/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.3/demo
drwxr-xr-x. 4 oracle oinstall 4096 Jan 10 06:46 ./apex/images/themes/theme_42/1.0/demo
drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/21.1/demo
drwxr-xr-x. 3 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/22.1/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/js/demo
drwxr-xr-x. 2 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/css/demo
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2022 ./apex/images/themes/theme_42/1.5/demo
drwxr-xr-x. 2 oracle oinstall 4096 Apr 17  2019 ./sdk/demo
drwxr-xr-x. 5 oracle oinstall 12288 Jan 10 06:49 ./rdbms/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./odbc/demo
drwxr-x---. 3 oracle oinstall 4096 Apr 17  2019 ./inventory/Templates/demo
drwxr-xr-x. 3 oracle oinstall 4096 Apr 17  2019 ./demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./ldap/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./jdbc/demo

Since the installation date is January 10, the newly installed directory can also be filtered out by the following command:

$ find . -name demo -type d -exec ls -ld {
    
    } \;|grep "Jan 10"|grep -v apex
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./nls/gdk/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./nls/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./sqlj/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./plsql/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./sqlplus/demo
drwxr-xr-x. 13 oracle oinstall 4096 Jan 10 06:49 ./md/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./jpub/demo
drwxr-x---. 5 oracle oinstall 4096 Jan 10 06:49 ./xdk/demo
drwxr-xr-x. 5 oracle oinstall 4096 Jan 10 06:49 ./precomp/demo
drwxr-xr-x. 5 oracle oinstall 12288 Jan 10 06:49 ./rdbms/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./odbc/demo
drwxr-xr-x. 3 oracle oinstall 4096 Jan 10 06:49 ./ldap/demo
drwxr-xr-x. 2 oracle oinstall 4096 Jan 10 06:49 ./jdbc/demo

error handling

When installing on non-19.3 versions, the following errors were encountered:

$ ./runInstaller -silent -responseFile /home/oracle/examples/response/demos_install.rsp
WARNING:OUI-10221:The install touches a component that is patched by interim patches 'Interim Patch# 34133642'. The interim patches affect other components not included in the install.
You may rollback the interim patches 'Interim Patch# 34133642' using OPatch for consistency before performing the upgrade.
You may also choose to ignore this warning and continue with the upgrade. If you choose to continue, the conflicting patches will be removed from the inventory. However, some files that are not updated during the upgrade may be left behind. Contact Support to check applicability and availability of interim patches 'Interim Patch# 34133642' for this install.
Do you want to ignore the patch conflicts and continue with the upgrade?
[FATAL]

I chose the patch mentioned in the rollback output. Since this patch has dependencies, I actually completed it in 3 steps:

opatch rollback -id 33631337
opatch rollback -id 34113634
opatch rollback -id 34133642

Of course, this is not recommended in a production environment.

I did not find the -ignorePatchConflicts option of runInstallers in 19c, and found that the OPatch documentation is actually classified under Oracle Enterprise Manager, see here for details .

Supongo que te gusta

Origin blog.csdn.net/stevensxiao/article/details/128540174
Recomendado
Clasificación