Oracle Database 12c r2 to 19c In-place Upgrade

Oracle Database 12c r2 to 19c In-place Upgrade

Bu yazıda Oel7u9 üzerinde çalışan 12cR2 versiyonlu Oracle veri tabanını in place upgrade ile 19c’ye yükseltme adımlarını yazıyor olacağım

işletim sisteminde Oracle 19c versiyonu için gerekli olan paketleri yüklüyorum

yum install -y oracle-database-preinstall-19c

19c oracle home dizinini oluşturuyorum

mkdir – p /u01/app/oracle/product/19.0.0/db_1

19c installer zip dosyasını 19c home dosyasının altına kopyalayıp sonrasında zip’den çıkarıyorum

unzip LINUX.X64_193000_db_home.zip

Kurulum adımına geçiyorum

./runInstaller

SQL> select count(*) from dba_objects where status=’INVALID’; COUNT(*)

0

[oracle@db12c db_1]$ /u01/app/oracle/product/12.2.0/db_1/jdk/bin/java -jar

/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/preupgrade.jar FILE DIR

/home/oracle/preupgrade

================== PREUPGRADE SUMMARY

==================

/home/oracle/preupgrade/preupgrade.log

/home/oracle/preupgrade/preupgrade_fixups.sql

/home/oracle/preupgrade/postupgrade_fixups.sql Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups @/home/oracle/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups @/home/oracle/preupgrade/postupgrade_fixups.sql

Preupgrade complete: 2023-01-23T17:12:24

cat /home/oracle/preupgrade/preupgrade.log

SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by: Oracle Preupgrade Script

Version: 19.0.0.0.0 Build: 1

Generated on: 2023-01-23 18:12:22 For Source Database: ORCL

Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0

Preup Preupgrade

Action Issue Is

Number

Preupgrade Check

Name

Remedied

Further DBA Action

1.

dictionary_stats

YES

None.

2.

pre_fixed_objects

YES

None.

3.

tablespaces_info

NO

Informational only.

Further action is optional.

4. rman_recovery_version NO Informational only.

Further action is optional.

The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database.

Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database is not ready

for upgrade. To resolve the outstanding issues, start by reviewing the preupgrade_fixups.sql and searching it for the name of

the failed CHECK NAME or Preupgrade Action Number listed above.

There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done.

PL/SQL procedure successfully completed.

PURGE DBA_RECYCLEBIN;

alter system set db_recovery_file_dest_size=10G;

SQL> create restore point upgrade19c_before guarantee flashback database;

SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point; NAME

GUA TIME

UPGRADE19C_BEFORE

YES 24-JAN-23 09.37.46.000000000 AM

/u01/app/oracle/product/19.0.0/db_1/bin/.dbua

SQL> col COMP_ID for a10

col COMP_NAME for a40 col VERSION for a15

set lines 180

set pages 999

select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;SQL> SQL> SQL> SQL> SQL> COMP_ID COMP_NAME VERSION STATUS

CATALOG Oracle Database Catalog Views

CATPROC Oracle Database Packages and Types JAVAVM JServer JAVA Virtual Machine

XML Oracle XDK

CATJAVA Oracle Database Java Packages APS OLAP Analytic Workspace

RAC Oracle Real Application Clusters XDB Oracle XML Database

OWM Oracle Workspace Manager CONTEXT Oracle Text

ORDIM Oracle Multimedia

SDO Spatial

XOQ Oracle OLAP API

OLS Oracle Label Security

DV Oracle Database Vault

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

19.0.0.0.0

VALID

VALID VALID VALID VALID VALID

OPTION OFF VALID

VALID VALID VALID VALID VALID VALID

VALID

15 rows selected.

SQL>@/home/oracle/preupgrade/preupgrade_fixups.sql Session altered.

PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created.

No errors.

Package body created.

PL/SQL procedure successfully completed. No errors.

Package created. No errors.

Package body created. No errors.

Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by: Oracle Preupgrade Script

Version: 19.0.0.0.0 Build: 1

Generated on: 2023-01-23 18:12:23 For Source Database: ORCL

Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0

Preup Preupgrade

Action Issue Is

Number Preupgrade Check Name Remedied Further DBA Action

5. old_time_zones_exist

YES

None.

6. dir_symlinks

YES

None.

7. post_dictionary

YES

None.

8. post_fixed_objects

NO

Informational only.

Further action is optional.

The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database.

Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not

fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of

the failed CHECK NAME or Preupgrade Action Number listed above.

There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done.

PL/SQL procedure successfully completed. Session altered.

SQL> show parameter COMPATIBLE

NAME

TYPE

VALUE

compatible

string

12.2.0

noncdb_compatible

boolean

FALSE

SQL> drop restore point UPGRADE19C_BEFORE

SQL> ALTER SYSTEM SET COMPATIBLE = ‘19.0.0’ SCOPE=SPFILE;

System altered.

SQL> shut immediate; SQL> startup;