Home >Operation and Maintenance >Linux Operation and Maintenance >Introducing the steps and techniques for Oracle patch installation
Oracle Database is one of the most popular databases for large enterprise applications. It can be used to manage and store all data in an enterprise. Like most software, Oracle databases are prone to bugs and vulnerabilities. To prevent external attacks and data leaks, Oracle regularly releases patches to address these issues.
However, Oracle patch installation is not a simple task. During this process, special attention needs to be paid to the type and version of patches installed, as well as the current version of the database. Keeping your database secure requires considering several factors. In this article, we will cover the steps and techniques for Oracle patch installation.
Before installing Oracle patches, you need to determine which patches need to be installed. Usually, Oracle releases the latest patches on its official website. We can find and download the required patches through the Patch & Updates on the official website or the MOS (My Oracle Support) page. The required patches can be retrieved by Bug Number or CVE Number. These patches can be installed using the opatch command.
Before installing the patch, we need to determine the current Oracle software version. This is important because patches cannot be used across different versions. It is necessary to confirm the patch level of the current software and the compatibility of the target patch. You can check the current Oracle software version through the following command:
SQL> select * from v$version;
This query will return the Oracle software version information, for example:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production PL/SQL Release 12.1.0.2.0 - Production CORE 12.1.0.2.0 Production TNS for Linux: Version 12.1.0.2.0 - Production NLSRTL Version 12.1.0.2.0 - Production
There are two aspects to note when downloading the required patches. The first step is to download the patch for the current Oracle software version. The second step is to download the patch for the correct feature or component because Oracle database is made up of multiple components or features.
Find the required patch through "Patch & Updates" on the Oracle official website or MOS page, and then select download on the page. The downloaded file is usually a set of files including a "README" document, application files, log files, and an "Oracle Universal Installer" (OUI) file.
Before installing the patch, you need to ensure that the database is modified to "silent mode" or does not accept any connections (NOPARALLEL). The database can be modified to NOPARALLEL using the following command:
SQL> alter system enable restricted session; SQL> alter system set job_queue_processes=0; SQL> alter system set parallel_max_servers=0; SQL> alter system set parallel_servers_target=0;
When installing the patch in silent mode, you need to install it using the OUI. You can use the following command to start OUI:
$ cd $ORACLE_HOME/oui/bin $ ./runInstaller
Then the OUI welcome interface will start, just follow the steps prompted by the interface to install the patch.
After the installation is completed, it is recommended to set the database to "non-silent mode":
SQL> alter system disable restricted session;
You can also use the opatch command to install patches during installation, for example:
$ cd $ORACLE_HOME/OPatch $ ./opatch apply /path/to/patch/12345678
In The library's processes should be resumed immediately after the installation is complete. For example:
SQL> alter system set parallel_servers_target=32; SQL> alter system set parallel_max_servers=160; SQL> alter system set job_queue_processes=1000;
After installing the patch, you also need to check whether the patch is installed successfully. You can use the following command to check the patch list:
$ opatch lsinventory
Or you can use the following command to check the patch version:
SQL> select * from dba_registry_history;
The database version information will be returned.
It should be noted that each patch needs to be tested in a test environment before installing it. Test results must be reviewed to confirm if revisions are needed and with the security agency to ensure the patch complies with corporate security policies.
Summary
The security of your Oracle database is critical, and installing the correct Oracle patches can help you keep your database secure. Before installing a patch, always make sure you have checked and downloaded the current Oracle software version and required patches, and taken the necessary precautions. Installing the patch can take several hours, so make sure you plan before updating and take backups when changing database settings.
The above is the detailed content of Introducing the steps and techniques for Oracle patch installation. For more information, please follow other related articles on the PHP Chinese website!