User Tools

Site Tools


wiki:update_oracle_database_on_windows_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:update_oracle_database_on_windows_server [2024/02/01 11:05] wagner.jerwiki:update_oracle_database_on_windows_server [2025/05/06 08:22] (current) wagner.jer
Line 1: Line 1:
   * __**Download the required patches to perform update**__\\   * __**Download the required patches to perform update**__\\
- Latest versions can be found on the following page[[https://support.oracle.com/knowledge/Oracle%20Cloud/2521164_1.html]]+ Latest versions can be found on the following page [[https://support.oracle.com/knowledge/Oracle%20Cloud/2521164_1.html]]
   Windows Bundle Patch - R19x Database Release Update Revision, column "Included in Windows Bundle"   Windows Bundle Patch - R19x Database Release Update Revision, column "Included in Windows Bundle"
   OJVM - R19x OJVM Release Update   OJVM - R19x OJVM Release Update
-**//Note://** Windows patches release date might be delayed of other patches. You can find real release dates on the following link: [[https://dbsguru.com/oracle-critical-database-patch-id-jan-2024/]] \\ +**//Note: //** Windows patches release date might be delayed of other patches. You can find real release dates on the following link: [[https://dbsguru.com/patching/]] \\ 
-Once patches numbers are noted you can download from the support page: [[https://support.oracle.com]]\\+Once patches numbers are noted you can download from the support pagc:\source [[https://support.oracle.com]]\\
  
   * __**Install patches on Windows server**__\\   * __**Install patches on Windows server**__\\
Line 14: Line 14:
   * Check if there are any invalid packages    * Check if there are any invalid packages 
 Start CMD as administrator Start CMD as administrator
-<cli type=dos>sqlplus /nolog +<cli type=dos>sqlplus /nolog</cli> 
-SQL> connect as sysdba +<cli type=dos>SQL> connect as sysdba</cli> 
-Enter user-name: sys+Enter user-namc:\source sys
 Enter password:***** Enter password:*****
 Connected Connected
-SQL> set line 2000 +<cli type=dos>SQL> set line 2000</cli> 
-SQL> select owner, object_type, object_name,status from dba_objects where status != 'VALID' order by owner, object_type;+<cli type=dos>SQL> select owner, object_type, object_name,status from dba_objects where status != 'VALID' order by owner, object_type;
  
-no rows selected+no rows selected</cli>
  
-SQL> exit</cli>+<cli type=dos>SQL> exit</cli>
   * Check if there is any conflict with any installed patch   * Check if there is any conflict with any installed patch
 Start CMD as administrator Start CMD as administrator
 Navigate to the folder where you extracted the Windows Bundle Patch and run the command to check for any conflict from that folder Navigate to the folder where you extracted the Windows Bundle Patch and run the command to check for any conflict from that folder
-<cli type=dos>cd E:\35962832 +<cli type=dos>cd c:\source\35962832</cli> 
-E:\35962832>C:\oracle\product\19.3.0\dbhome_1\Opatch\opatch prereq CheckConflictAgainstOHWithDetail -ph ./+<cli type=dos>c:\source\35962832>C:\oracle\product\19.3.0\dbhome_1\Opatch\opatch prereq CheckConflictAgainstOHWithDetail -ph ./
 Oracle Interim Patch Installer version 12.2.0.1.41 Oracle Interim Patch Installer version 12.2.0.1.41
 Copyright (c) 2024, Oracle Corporation.  All rights reserved. Copyright (c) 2024, Oracle Corporation.  All rights reserved.
Line 100: Line 100:
   * Check that the ORACLE_HOME variable is defined and that the PATH variable contains %ORACLE_HOME%\perl\bin   * Check that the ORACLE_HOME variable is defined and that the PATH variable contains %ORACLE_HOME%\perl\bin
 <cli type=dos>echo %ORACLE_HOME% <cli type=dos>echo %ORACLE_HOME%
-C:\oracle\product\19.3.0\dbhome_1+C:\oracle\product\19.3.0\dbhome_1</cli>
  
-E:\35962832>echo %PATH%+<cli type=dos>c:\source\35962832>echo %PATH%
 C:\oracle\product\19.3.0\dbhome_1\bin;C:\Install_Oracle19c\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\oracle\product\19.3.0\dbhome_1\perl\bin</cli> C:\oracle\product\19.3.0\dbhome_1\bin;C:\Install_Oracle19c\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\oracle\product\19.3.0\dbhome_1\perl\bin</cli>
   * If not present, type the following:   * If not present, type the following:
-<cli type=dos>set ORACLE_HOME=C:\oracle\product\19.3.0\dbhome_1 +<cli type=dos>set ORACLE_HOME=C:\oracle\product\19.3.0\dbhome_1</cli> 
-set PATH=%ORACLE_HOME%\perl\bin;%PATH%</cli>+<cli type=dos>set PATH=%ORACLE_HOME%\perl\bin;%PATH%</cli>
   * Stop all Oracle Services from the services.msc console   * Stop all Oracle Services from the services.msc console
   * Navigate to the extracted patch folder and run following command:   * Navigate to the extracted patch folder and run following command:
-<cli type=dos>cd E:\35962832+<cli type=dos>cd c:\source\35962832</cli>
  
-E:\35962832>C:\oracle\product\19.3.0\dbhome_1\OPatch\opatch apply+<cli type=dos>c:\source\35962832>C:\oracle\product\19.3.0\dbhome_1\OPatch\opatch apply
 Oracle Interim Patch Installer version 12.2.0.1.41 Oracle Interim Patch Installer version 12.2.0.1.41
 Copyright (c) 2024, Oracle Corporation.  All rights reserved. Copyright (c) 2024, Oracle Corporation.  All rights reserved.
Line 151: Line 151:
   * Start the Oracle services from the services.msc console   * Start the Oracle services from the services.msc console
   * Post installation datapatch, navigate to the Oracle installation folder and type the followig command:   * Post installation datapatch, navigate to the Oracle installation folder and type the followig command:
-<cli type=dos>E:\35962832>cd %ORACLE_HOME%\OPatch+<cli type=dos>c:\source\35962832>cd %ORACLE_HOME%\OPatch</cli>
  
-C:\oracle\product\19.3.0\dbhome_1\OPatch>datapatch -verbose+<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\OPatch>datapatch -verbose
 SQL Patching tool version 19.22.0.0.0 Production on Thu Feb  1 10:14:49 2024 SQL Patching tool version 19.22.0.0.0 Production on Thu Feb  1 10:14:49 2024
 Copyright (c) 2012, 2024, Oracle.  All rights reserved. Copyright (c) 2012, 2024, Oracle.  All rights reserved.
Line 165: Line 165:
 Validating logfiles...done Validating logfiles...done
 Patch 35648110 rollback: SUCCESS Patch 35648110 rollback: SUCCESS
-  logfile: C:\oracle\cfgtoollogs\sqlpatch\35648110\25431514/35648110_rollback_SLMTST_2024Feb01_10_17_22.log (no errors)+  logfilc:\source C:\oracle\cfgtoollogs\sqlpatch\35648110\25431514/35648110_rollback_SLMTST_2024Feb01_10_17_22.log (no errors)
 Patch 35962832 apply: SUCCESS Patch 35962832 apply: SUCCESS
-  logfile: C:\oracle\cfgtoollogs\sqlpatch\35962832\25463642/35962832_apply_SLMTST_2024Feb01_10_17_22.log (no errors)+  logfilc:\source C:\oracle\cfgtoollogs\sqlpatch\35962832\25463642/35962832_apply_SLMTST_2024Feb01_10_17_22.log (no errors)
 SQL Patching tool complete on Thu Feb  1 10:18:00 2024</cli> SQL Patching tool complete on Thu Feb  1 10:18:00 2024</cli>
   * Navigate to the rdbms\admin folder and recompile object using the following command:   * Navigate to the rdbms\admin folder and recompile object using the following command:
-<cli type=dos>cd %ORACLE_HOME%\rdbms\admin+<cli type=dos>cd %ORACLE_HOME%\rdbms\admin</cli>
  
-C:\oracle\product\19.3.0\dbhome_1\rdbms\admin>sqlplus /nolog+<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\rdbms\admin>sqlplus /nolog
  
 SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 1 10:19:07 2024 SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 1 10:19:07 2024
 Version 19.22.0.0.0 Version 19.22.0.0.0
  
-Copyright (c) 1982, 2023, Oracle.  All rights reserved.+Copyright (c) 1982, 2023, Oracle.  All rights reserved.</cli>
  
-SQL> connect as sysdba +<cli type=dos>SQL> connect as sysdba 
-Enter user-name: sys+Enter user-namc:\source sys
 Enter password: Enter password:
-Connected. +Connected.</cli> 
-SQL> @.\utlrp.sql+<cli type=dos>SQL> @.\utlrp.sql
  
 Session altered. Session altered.
Line 211: Line 211:
  
 PL/SQL procedure successfully completed. PL/SQL procedure successfully completed.
- +</cli> 
 +<cli type=dos>
 SQL> select username,status,logon_time From V$session where status='ACTIVE' order by username; SQL> select username,status,logon_time From V$session where status='ACTIVE' order by username;
  
Line 225: Line 225:
 . .
 48 rows selected. 48 rows selected.
- +</cli> 
-SQL> exit+<cli type=dos>SQL> exit
 Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
 Version 19.22.0.0.0</cli> Version 19.22.0.0.0</cli>
   * Check that patch has been successfully installed   * Check that patch has been successfully installed
-<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\rdbms\admin>cd C:\oracle\product\19.3.0\dbhome_1\Opatch+<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\rdbms\admin>cd C:\oracle\product\19.3.0\dbhome_1\Opatch</cli> 
 + 
 +<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\OPatch>opatch lspatches 
 +35962832;Windows Database Bundle Patch : 19.22.0.0.240116 (35962832)</cli> 
 + 
 +\\ 
 +\\ 
 +//**Installation of the OJVM patch:**// \\ 
 +Note: Make sure that the Windows Database bundle patch has been successfully installed before proceeding with OJVM patch \\ 
 +\\ 
 +  * Check that the ORACLE_HOME variable is defined and that the PATH variable contains %ORACLE_HOME%\perl\bin 
 +<cli type=dos>echo %ORACLE_HOME% 
 +C:\oracle\product\19.3.0\dbhome_1</cli> 
 + 
 +<cli type=dos>c:\source\35962832>echo %PATH% 
 +C:\oracle\product\19.3.0\dbhome_1\bin;C:\Install_Oracle19c\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\oracle\product\19.3.0\dbhome_1\perl\bin</cli> 
 +  * If not present, type the following: 
 +<cli type=dos>set ORACLE_HOME=C:\oracle\product\19.3.0\dbhome_1</cli> 
 +<cli type=dos>set PATH=%ORACLE_HOME%\perl\bin;%PATH%</cli> 
 +  * Navigate to the extracted patch folder and check for any conflict with other already installed patches: 
 +<cli type=dos>C:\Windows\system32>cd C:\source\35926646</cli> 
 +<cli type=dos>C:\source\35926646>C:\oracle\product\19.3.0\dbhome_1\OPatch\opatch prereq CheckConflictAgainstOHWithDetail -ph ./ 
 +Oracle Interim Patch Installer version 12.2.0.1.41 
 +Copyright (c) 2024, Oracle Corporation.  All rights reserved. 
 + 
 +PREREQ session 
 + 
 +Oracle Home       : C:\oracle\product\19.3.0\dbhome_1 
 +Central Inventory : C:\Program Files\Oracle\Inventory 
 +   from           : 
 +OPatch version    : 12.2.0.1.41 
 +OUI version       : 12.2.0.7.0 
 +Log file location : C:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2024-02-01_10-24-17AM_1.log 
 + 
 +Invoking prereq "checkconflictagainstohwithdetail" 
 + 
 +Prereq "checkConflictAgainstOHWithDetail" passed. 
 + 
 +OPatch succeeded. 
 +</cli> 
 +  * Apply the patch: 
 +<cli type=dos>c:\source\35926646>C:\oracle\product\19.3.0\dbhome_1\OPatch\opatch apply 
 +Oracle Interim Patch Installer version 12.2.0.1.41 
 +Copyright (c) 2024, Oracle Corporation.  All rights reserved. 
 + 
 + 
 +Oracle Home       : C:\oracle\product\19.3.0\dbhome_1 
 +Central Inventory : C:\Program Files\Oracle\Inventory 
 +   from           : 
 +OPatch version    : 12.2.0.1.41 
 +OUI version       : 12.2.0.7.0 
 +Log file location : C:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2024-02-01_10-27-16AM_1.log 
 + 
 +Verifying environment and performing prerequisite checks... 
 +OPatch continues with these patches:   35926646 
 + 
 +Do you want to proceed? [y|n]</cli> 
 +  * Confirm with "Y" and press Enter 
 +<cli type=dos>User Responded with: Y 
 +All checks passed. 
 + 
 +Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. 
 +(Oracle Home = 'C:\oracle\product\19.3.0\dbhome_1'
 + 
 + 
 +Is the local system ready for patching? [y|n]</cli> 
 +  * Confirm with "Y" and press Enter 
 +<cli type=dos>User Responded with: Y 
 +Backing up files... 
 +Applying interim patch '35926646' to OH 'C:\oracle\product\19.3.0\dbhome_1' 
 + 
 +Patching component oracle.rdbms, 19.0.0.0.0... 
 + 
 +Patching component oracle.javavm.server.core, 19.0.0.0.0... 
 + 
 +Patching component oracle.rdbms.dbscripts, 19.0.0.0.0... 
 + 
 +Patching component oracle.javavm.server, 19.0.0.0.0... 
 + 
 +Patching component oracle.javavm.client, 19.0.0.0.0... 
 +Patch 35926646 successfully applied. 
 +Log file location: C:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2024-02-01_10-27-16AM_1.log 
 + 
 +OPatch succeeded.</cli> 
 +  * Start all Oracle services  
 +  * Post installation startup for datapatch 
 +<cli type=dos>sqlplus /nolog 
 + 
 +SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 1 10:37:19 2024 
 +Version 19.22.0.0.0 
 + 
 +Copyright (c) 1982, 2023, Oracle.  All rights reserved. 
 +</cli> 
 +<cli type=dos>SQL> connect as sysdba 
 +Enter user-name: sys 
 +Enter password: 
 +Connected.</cli> 
 +<cli type=dos>SQL> shutdown immediate 
 +Database closed. 
 +Database dismounted. 
 +ORACLE instance shut down.</cli> 
 +<cli type=dos>SQL> startup upgrade 
 +ORACLE instance started. 
 + 
 +Total System Global Area 2768238136 bytes 
 +Fixed Size                  9078328 bytes 
 +Variable Size            1308622848 bytes 
 +Database Buffers         1442840576 bytes 
 +Redo Buffers                7696384 bytes 
 +Database mounted. 
 +Database opened.</cli> 
 +<cli type=dos>SQL> exit 
 +Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production 
 +Version 19.22.0.0.0</cli> 
 +<cli type=dos>cd %ORACLE_HOME%\OPatch</cli> 
 + 
 +<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\OPatch>datapatch -verbose 
 +SQL Patching tool version 19.22.0.0.0 Production on Thu Feb  1 10:41:09 2024 
 +Copyright (c) 2012, 2024, Oracle.  All rights reserved. 
 + 
 +Log file for this invocation: C:\oracle\cfgtoollogs\sqlpatch\sqlpatch_7552_2024_02_01_10_41_09\sqlpatch_invocation.log 
 + 
 +Connecting to database...OK 
 +
 +
 +
 +Installing patches... 
 +Patch installation complete.  Total patches installed: 1 
 + 
 +Validating logfiles...done 
 +Patch 35926646 apply: SUCCESS 
 +  logfile: C:\oracle\cfgtoollogs\sqlpatch\35926646\25549578/35926646_apply_SLMTST_2024Feb01_10_42_00.log (no errors) 
 +SQL Patching tool complete on Thu Feb  1 10:42:01 2024 
 +</cli> 
 +<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\OPatch>sqlplus /nolog 
 + 
 +SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 1 10:42:08 2024 
 +Version 19.22.0.0.0 
 + 
 +Copyright (c) 1982, 2023, Oracle.  All rights reserved. 
 +</cli> 
 +<cli type=dos>SQL> connect as sysdba 
 +Enter user-name: sys 
 +Enter password: 
 +Connected.</cli> 
 +<cli type=dos>SQL> shutdown immediate 
 +Database closed. 
 +Database dismounted. 
 +ORACLE instance shut down.</cli> 
 +<cli type=dos>SQL> startup 
 +ORACLE instance started. 
 + 
 +Total System Global Area 2768238136 bytes 
 +Fixed Size                  9078328 bytes 
 +Variable Size            1308622848 bytes 
 +Database Buffers         1442840576 bytes 
 +Redo Buffers                7696384 bytes 
 +Database mounted. 
 +Database opened.</cli> 
 +<cli type=dos>SQL> exit 
 +Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production 
 +Version 19.22.0.0.0</cli> 
 +  * Navigate to the rdbms\admin folder and recomplie object 
 +<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\OPatch>cd %ORACLE_HOME%\rdbms\admin</cli> 
 + 
 +<cli type=dos>C:\oracle\product\19.3.0\dbhome_1\rdbms\admin>sqlplus /nolog 
 + 
 +SQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 1 10:44:32 2024 
 +Version 19.22.0.0.0 
 + 
 +Copyright (c) 1982, 2023, Oracle.  All rights reserved. 
 +</cli> 
 +<cli type=dos>SQL> connect as sysdba 
 +Enter user-name: sys 
 +Enter password: 
 +Connected.</cli> 
 +<cli type=dos>SQL> @.\utlrp.sql 
 + 
 +Session altered. 
 + 
 + 
 +TIMESTAMP 
 +-------------------------------------------------------------------------------- 
 +COMP_TIMESTAMP UTLRP_BGN              2024-02-01 10:44:53 
 + 
 +DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid 
 +
 +
 +
 +ERRORS DURING RECOMPILATION 
 +--------------------------- 
 +                          0 
 + 
 + 
 +Function created. 
 + 
 + 
 +PL/SQL procedure successfully completed. 
 + 
 + 
 +Function dropped.
  
-C:\oracle\product\19.3.0\dbhome_1\OPatch>opatch lspatches 
-35962832;Windows Database Bundle Patch : 19.22.0.0.240116 (**35962832**)</cli> 
  
 +PL/SQL procedure successfully completed.</cli>
 +<cli type=dos>SQL> select owner, object_type, object_name,status from dba_objects where status != 'VALID' order by owner, object_type;
  
 +no rows selected</cli>
 +  * Check the active connections 
 +  * <cli type=dos>SQL> select username,status,logon_time From V$session where status='ACTIVE' order by username;</cli>
wiki/update_oracle_database_on_windows_server.1706785531.txt.gz · Last modified: by wagner.jer

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki