收集数据库升级 迁移诊断信息的脚本 (dbupgdiag.sql) (Doc ID 1577288.1、556610.1)
收集数据库升级/迁移诊断信息的脚本 (dbupgdiag.sql) (Doc ID 1577288.1)
适用于:
Oracle Database Backup Service - 版本 N/A 和更高版本
Oracle Database Cloud Service - 版本 N/A 和更高版本
Oracle Database - Enterprise Edition - 版本 9.2.0.1 到 12.2.0.1 [发行版 9.2 到 12.2]
Oracle Database Cloud Schema Service - 版本 N/A 和更高版本
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - 版本 N/A 和更高版本
本文档所含信息适用于所有平台
用途
这个脚本为升级前后诊断数据库状态提供了非常友好的输出。脚本将生成一个文件,名称为db_upgdiag
在多租户数据库环境,应该分别在每个容器中运行。
要求
这个脚本需要使用SYS 用户在SQL*Plus中运行,并且在升级前和升级后的数据库中都要执行。
它会帮助判定升级前后的数据库的状态。
配置
下载并保存脚本为dbupgdiag.sql。这个脚本不需要额外的配置。
说明
以sysdba连接,执行下面的脚本
1 2 3 4 5 | cd <location of the script> $ sqlplus / as sysdba sql> alter session set nls_language='American'; sql> @dbupgdiag.sql sql> exit |
警告
此示例代码只为教育目的,Oracle Support不提供技术支持。它已经过内部测试,然而我们无法确保它在任何环境中都能成功使用。请您在使用之前先在测试环境中运行。
SCRIPT
点击此处下载脚本
在升级前后执行脚本并把结果日志文件提供给Oracle Support以作分析。
示例输出
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | SQL> @dbupgdiag.sql Enter location for Spooled output as Parameter 1: Enter value for 1: /tmp *** Start of LogFile *** Oracle Database Upgrade Diagnostic Utility 07-01-2008 12:17:30 ... ... Script output ... ... *** End of LogFile * Upload db_upg_diag<SID>01-Jul-2008_1217.log from "/tmp" directory |
请点击此处.查看详细的示例日志文件。
参考
NOTE:412271.1 - ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While Upgrading or Patching Databases to 10.2.0.3
NOTE:397770.1 - How to Check or Verify if the Oracle JVM is Installed in the Database
NOTE:456949.1 - Script to Check the Status or State of the JVM within the Database
Attachments dbupgdiag.log
(14.49 KB)
dbupgdiag.sql
(24.06 KB)
Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql) (Doc ID 556610.1)
APPLIES TO:
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
PURPOSE
This script is intended to provide a user friendly output to diagnose the status of the database either before (or) after upgrade. The script will create a file called db_upgdiag
On Container Database , this should be run individually on each container.
REQUIREMENTS
The script needs to be run in SQL*Plus both before the upgrade on the source database and after the upgrade on the upgraded database as SYS user.
This will help to determine the status of the database before and after upgrade.
CONFIGURING
Download and save the script as dbupgdiag.sql. The script needs no additional configuration.
INSTRUCTIONS
Connect as sysdba and execute the script
cd
$ sqlplus / as sysdba
sql> alter session set nls_language='American';
sql> @dbupgdiag.sql
sql> exit
CAUTION
This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.
SCRIPT
Download the script from here
Execute the script before and after upgrade and provide the resultant log files to Oracle Support for analysis purposes.
SAMPLE OUTPUT
1 2 3 4 5 6 7 8 9 | SQL> @dbupgdiag.sql Enter location for Spooled output as Parameter 1: Enter value for 1: /tmp *** Start of LogFile *** Oracle Database Upgrade Diagnostic Utility 07-01-2008 12:17:30 ... ... |
Script output
...
...
End of LogFile
1 |
Upload db_upg_diag_orcl102_01-Jul-2008_1217.log from "/tmp" directory
To view the sample log file click here.
REFERENCES
NOTE:412271.1 - ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While Upgrading or Patching Databases to 10.2.0.3
NOTE:397770.1 - How to Check or Verify if the Oracle JVM is Installed in the Database
NOTE:456949.1 - Script to Check the Status or State of the JVM within the Database
Attachments db_upg_diag_ORCL_20_Mar_2012_1211.log
(14.49 KB)
dbupgdiag.sql
(24.06 KB)