Documentação MOS
MOS Note – AutoUpgrade Tool
Documentação MOS
Requisitos do AutoUpgrade
- Java 8 ou mais recente
Padrão no $ORACLE_HOME a partir do 12.1.0.2
Requisitos do Banco de Dados para Upgrade
- Versão Mínima do Banco de Dados: 11.2.0.4
- Package do AutoUpgrade (Fazer download da versão atualizada)
Arquivo jar disponibilizado (autoupgrade.jar) - Executar Backup quando o Banco de Dados for Standard Edition.
Arquivo de Configuração
Crie o arquivo de configuração que será utilizado pelo AutoUpgrade.
Utilize o exemplo de configuração (Sample File Config).
$ cd /u01/stage $ /u01/app/oracle/19.3.0.0/db_1/jdk/bin/java -jar autoupgrade.jar -create_sample_file config > Created sample configuration file /u01/stage/sample_config.cfg
Altere as configurações de acordo com o ambiente configurado.
$ vim sample_config cfg global autoupg_log_dir=/u01/stage/upg_logs # # Database number 1 # upg1 dbname=WINT upg1 start_time=NOW upg1 source_home=/u01/app/oracle/11 2 0 4/db_1 upg1 target_home=/u01/app/oracle/19 3 0 0/db_1 upg1 sid=WINT upg1 log_dir=/u01/stage/upg_logs/WINT upg1 upgrade_node=localhost upg1 target_version=19 $ mv sample_config cfg config cfg
Modo Analyze
O Modo ANALYZE não realiza alterações no banco de dados de origem. O Analyze realiza leituras no banco de dados de origem e analisa o banco de dados.
Após a execução do Analyze é possível verificar informações do setup e prechecks realizados nos arquivos .html e preupgrade.log
$/u01/app/oracle/19 3 0 0/db_1/jdk/bin/java -jar autoupgrade jar -config config cfg -mode analyze AutoUpgrade tool launched with default options +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 databases will be analyzed Type 'help' to list console commands upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished successfully [1] Jobs failed [0] Jobs pending [0] ------------- JOBS FINISHED SUCCESSFULLY ------------- Job 101 FOR WINT
É altamente recomendado que você execute o modo ANALYZE em todos os casos.
Depois de concluído com êxito e sem erros, você pode ter certeza de que o banco de dados não terá surpresas durante uma atualização subsequente.
Modo Deploy
O modo DEPLOY é o mais importante e o mais abrangente, pois faz tudo de uma só vez, ANALYZE, FIXUPS e UPGRADE, incluindo as ações pós-atualização POSTUPGRADE.
$/u01/app/oracle/19 3 0 0/db_1/jdk/bin/java -jar autoupgrade jar -config config cfg -mode deploy AutoUpgrade tool launched with default options +--------------------------------+ +--------------------------------+ 1 databases will be processed Type 'help' to list console commands upg> lsj +----+-------+---------+---------+-------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+-------+--------------+--------+--------+-------------+ | 102| WINT|PREFIXUPS|EXECUTING|RUNNING|19/10/31 11:55| N/A|11:56:10|Remaining 4/6| +----+-------+---------+---------+-------+--------------+--------+--------+-------------+ upg> lsj +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ | 102| WINT|DBUPGRADE|EXECUTING|RUNNING|19/10/31 11:55| N/A|11:57:24|0%Upgraded | +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ upg> lsj +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ | 102| WINT|POSTFIXUPS|EXECUTING|RUNNING|19/10/31 11:55| N/A|12:35:46|Remaining 2/3| +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ Total jobs 1 upg> Job 102 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished successfully [1] Jobs failed [0] Jobs pending [0] ------------- JOBS FINISHED SUCCESSFULLY -------------
Upgrade Concluído
Abra o Log gerado pelo AutoUpgrade.
$ cd /u01/stage/upg_logs/WINT/WINT/102/dbupgrade $ cat upg_summary log Oracle Database Release 19 Post-Upgrade Status Tool 10-31-2019 12:24:3 Database Name: WINT Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19 3 0 0 0 00:11:42 JServer JAVA Virtual Machine UPGRADED 19 3 0 0 0 00:02:58 Oracle XDK UPGRADED 19 3 0 0 0 00:00:30 Oracle Database Java Packages UPGRADED 19 3 0 0 0 00:00:09 Oracle Workspace Manager UPGRADED 19 3 0 0 0 00:00:54 Oracle Real Application Clusters OPTION OFF 19 3 0 0 0 00:00:00 Oracle XML Database UPGRADED 19 3 0 0 0 00:02:34 Oracle Multimedia UPGRADED 19 3 0 0 0 00:02:33 Datapatch 00:02:17 Final Actions 00:03:01 Post Upgrade 00:00:19 Total Upgrade Time: 00:26:01 Database time zone version is 14 It is older than current release time zone version 32 Time zone upgrade is needed using the DBMS_DST package Grand Total Upgrade Time: [0d:0h:35m:33s]
Links
https://mikedietrichde.com/2019/09/05/the-september-2019-autoupgrade-and-the-autoupgrade-video/