MySQL: Updating the Configuration of a MySQL DB System on OCI
Overview: A MySQL configuration is a collection of variables that define the operation of a MySQL DB system. It is analogous to ... Read More
Découvrez pourquoi Eclipsys a été nommée 2023 Best Workplaces in Technology, Great Place to Work® Canada et Canada's Top 100 SME !
En savoir plus !My customer needed to migrate and upgrade Oracle Databases from 12.1.0.2 on Windows to 12.2.0.1 on Linux with minimum downtime.
Starting Oracle Database 11.2.0.1 it is possible to configure the Physical Standby database with at a higher patchset or major release Primary database for purposes of a migration to new hardware provided that after a switchover to that standby, the database is not allowed to open and is immediately upgraded in the normal manner (MOS Doc ID 785347.1).
Migration using Oracle Data Guard is the preferred choice for business-critical databases where downtime is limited. Migrating using Oracle Data Guard to clone and synch your source database, then activate and upgrade physical standby database which minimizes downtime.
Downtime begins with physical standby activation, which usually takes 3-5 minutes, but database upgrade time typically takes 25-30 minutes.
Data Guard will create a physical standby of the source 12.1.0.2 database on the target system using 12.2.0.1 Oracle home and keep it in sync with the original database, and during the cutover, the activated standby database will be upgraded to 12.2.0.1.
The process has two phases:
Below is a high-level action plan for creating the physical standby database on the target system using 12.2.0.1 home.
- On source database D:\oracle\product\12.1.0.2\dbhome_1\bin\sqlplus / as sysdba SQL> alter system switch logfile; SQL> archive log list; - On target standby database # export ORACLE_SID=PRODDB # export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1 # export PATH=$PATH:$ORACLE_HOME/bin # sqlplus / as sysdba SQL> select inst_id,PROCESS, STATUS, THREAD#, SEQUENCE#,BLOCK#, BLOCKS FROM GV$MANAGED_STANDBY order by inst_id; SQL> select max(sequence#) from v$archived_log where applied='YES'; SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS;
SQL> alter database recover managed standby database cancel; Database altered.
SQL> alter database activate standby database; Database altered. SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- -------------------- PRIMARY MOUNTED SQL> select controlfile_type from v$database; CONTROL ------- CURRENT
SQL> shutdown immediate Database dismounted. ORACLE instance shut down. SQL> startup upgrade ORACLE instance started. Total System Global Area 2147483648 bytes Fixed Size 8622776 bytes Variable Size 620760392 bytes Database Buffers 1476395008 bytes Redo Buffers 41705472 bytes Database mounted. Database opened.
# cd $ORACLE_HOME/rdbms/admin # mkdir -p $HOME/working/upgrade/PRODDB/logs # $ORACLE_HOME/perl/bin/perl catctl.pl -l /home/oracle/working/upgrade/PRODDB/logs catupgrd.sql
# cat /home/oracle/working/upgrade/PRODDB/logs/upg_summary.log # cat /home/oracle/working/upgrade/PRODDB/logs/catupgrd0.log | grep "^ORA-"
Note: below error is ignorable based on Doc ID 2325124.1
SP2-0310: unable to open file
“/u01/app/oracle/product/12.2.0.1/dbhome_1/rdbms/admin/dbmsclr.plb”
SQL> @/u01/app/oracle/product/12.2.0.1/dbhome_1/rdbms/admin/utlrp.sql
SQL> select substr(comp_id,1,15) comp_id,substr(comp_name,1,30) comp_name,substr(version,1,10) version,status from dba_registry;
SQL> shutdown immediate SQL> startup
If your time zone is too old, you can upgrade it by following steps in MOS Doc ID 1509653.1
In Oracle 12.2 a new feature has been released that enables the 32767 byte limit for VARCHAR2, NVARCHAR2, and RAW data types in SQL. Activate this feature following the next steps:
SQL> shutdown immediate SQL> startup upgrade SQL> alter system set MAX_STRING_SIZE=EXTENDED scope=spfile; SQL> @?/rdbms/admin/utl32k.sql SQL> shutdown immediate SQL> startup
That’s all! Enjoy your coming upgrade.
Overview: A MySQL configuration is a collection of variables that define the operation of a MySQL DB system. It is analogous to ... Read More
Overview: Oracle 23c introduces the use of SUM and AVG functions with INTERVAL datatype This enhancement makes it easier to calculate totals and ... Read More