Using the Pre-Upgrade Information Tool
The Pre-Upgrade Information Tool is a SQL script. that ships with the new Oracle Database 10g release, and must be copied to and run from the environment of the database being upgraded. Complete the following steps to run the Pre-Upgrade Information Tool:
-
Log in to the system as the owner of the Oracle home directory of the new Oracle Database 10g release.
-
Copy the following file from the ORACLE_HOME/rdbms/admin directory of the new Oracle Database 10g release to a directory outside of the Oracle home, such as the temporary directory on your system:
-
utlu102i.sql
Make a note of the new location of this file.
-
-
Log in to the system as the owner of the Oracle home directory of the database to be upgraded.
-
Change to the directory outside of the Oracle home directory that you copied files to in Step 2.
-
Start SQL*Plus.
-
Connect to the database instance as a user with SYSDBA privileges.
-
Set the system to spool results to a log file for later analysis:
SQL> SPOOL info.log
-
SQL> @utlu102i.sql
-
Turn off the spooling of script. results to the log file:
SQL> SPOOL OFF
Update Parameters
This section displays a list of initialization parameters in the parameter file of the current database that must be adjusted before the database is upgraded. The adjustments need to be made to the parameter file after it is copied to the new Oracle Database 10g release.
Deprecated Parameters
This section displays a list of initialization parameters in the parameter file of the current database that are deprecated in the new Oracle Database 10g release.
See Also:
"Deprecated Initialization Parameters" for a list of initialization parameters that are deprecated in the new Oracle Database 10 g releaseObsolete Parameters
This section displays a list of initialization parameters in the parameter file of the current database that are obsolete in the new Oracle Database 10g release. Obsolete initialization parameters need to be removed from the parameter file before the database is upgraded.
Note:
It is important to run Oracle Net Configuration Assistant before running the Database Upgrade Assistant (DBUA).Optimizer Statistics
When upgrading to Oracle Database 10g, optimizer statistics are collected for dictionary tables that lack statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade.
To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade. As of Oracle Database 10g Release 10.1, Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics. For example, you can enter the following:
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS:
Database Upgrade Assistant Command Line Options
The Database Upgrade Assistant supports several command line options. You can specify all valid options from the command line using the following syntax:
dbua [ -silent ] [ -dbName SID ] [ -disableUpgradeScriptLogging ] [ -backupLocation directory ] [ -postUpgradeScripts script [, script ] ... ] [ -initParam parameter= value [, parameter= value ] ... ] [ -emConfiguration { LOCAL | CENTRAL | NOBACKUP | NOEMAIL | NONE } -dbsnmpPassword password -sysmanPassword password [ -hostUserName hostname -hostUserPassword password -backupSchedule hh: mm ] ] [ -smtpServer server_name -emailAddress address ] -centralAgent location ] [ -recoveryAreaDestination directory ] [ -h | -help ]
手工升级:
1,rman备升级库
2,准备new oracle_home
把升级库的spfile(pfile),password file,specific cluster configure file 拷贝到它对应目录下面
3,调节以上cp过来相关文件的参数
4,升级
shutdown
配置相关环境变量--oracle_home,path and etc
5,cd 新的oracle_home
6,创建sysaux tablespace
Table 3-3 Guidelines for Sizing the SYSAUX Tablespace
Factor | Small | Medium | Large |
---|---|---|---|
Number of CPUs | 2 | 8 | 32 |
Number of concurrently active sessions | 5 | 20 | 100 |
Number of user objects (tables and indexes) | 500 | 5,000 | 50,000 |
Estimated SYSAUX size at steady state with default config | 500 MB | 2 GB | 5 GB |
SQL> CREATE TABLESPACE sysaux DATAFILE 'sysaux01.dbf'
SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
7,Set the system to spool results to a log file for later verification of success:
SQL> SPOOL upgrade.log SQL> @catupgrd.sql
ONLINE;
-
Run utlu102s.sql to display the results of the upgrade:
SQL> @utlu102s.sql
The Post-upgrade Status Tool displays the status of the database components in the upgraded database and the time required to complete each component upgrade. The Upgrade Status Tool displays output similar to the following:
Oracle Database 10.2 Upgrade Status Utility 04-20-2005 05:18:40
.
Component Status Version HH:MM:SS
Oracle Database Server VALID 10.2.0.1.0 00:11:37
JServer JAVA Virtual Machine VALID 10.2.0.1.0 00:02:47
Oracle XDK VALID 10.2.0.1.0 00:02:15
Oracle Database Java Packages VALID 10.2.0.1.0 00:00:48
Oracle Text VALID 10.2.0.1.0 00:00:28
Oracle XML Database VALID 10.2.0.1.0 00:01:27
Oracle Workspace Manager VALID 10.2.0.1.0 00:00:35
Oracle Data Mining VALID 10.2.0.1.0 00:15:56
Messaging Gateway VALID 10.2.0.1.0 00:00:11
OLAP Analytic Workspace VALID 10.2.0.1.0 00:00:28
OLAP Catalog VALID 10.2.0.1.0 00:00:59
Oracle OLAP API VALID 10.2.0.1.0 00:00:53
Oracle interMedia VALID 10.2.0.1.0 00:08:03
Spatial VALID 10.2.0.1.0 00:05:37
Oracle Ultra Search VALID 10.2.0.1.0 00:00:46
Oracle Label Security VALID 10.2.0.1.0 00:00:14
Oracle Expression Filter VALID 10.2.0.1.0 00:00:16
Oracle Enterprise Manager VALID 10.2.0.1.0 00:00:58
.
Total Upgrade Time: 00:56:09 -
Turn off the spooling of script. results to the log file:
SQL> SPOOL OFF
Then, check the spool file and verify that the packages and procedures compiled successfully. You named the spool file in Step 9; the suggested name was upgrade.log. Correct any problems you find in this file (see "Troubleshoot the Upgrade") and rerun the catupgrd.sql script, if necessary. You can rerun any of the scripts described in this chapter as many times as necessary. (If you have JAVAVM in your database, but you did not install the companion Oracle Database 10g Products, you will most likely receive error message ORA-29558.)
-
Shut down and restart the instance to reinitialize the system parameters for normal operation.
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUPCleanly shutting down and restarting the instance flushes all caches, clears buffers, and performs other housekeeping activities. These measures are an important final step to ensure the integrity and consistency of the newly upgraded Oracle Database.
Also, if you encountered a message listing obsolete initialization parameters when you started the database in Step 7, then remove the obsolete initialization parameters from the parameter file before restarting. If necessary, convert the spfile to a pfile so you can edit the file to delete parameters.
-
Run olstrig.sql to re-create DML triggers on tables with Oracle Label Security policies. (See Oracle Database Enterprise User Administrator's Guide for more information.) This step is only necessary if Oracle Label Security is in your database.
SQL> @olstrig.sql
-
Run utlrp.sql to recompile any remaining stored PL/SQL and Java code.
SQL> @utlrp.sql
Verify that all expected packages and classes are valid:
SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID';
SQL> SELECT distinct object_name FROM dba_objects WHERE status='INVALID'; -
Exit SQL*Plus.
手工重新恢复升级库
Abandon the Upgrade
If you completed the steps in "Back Up the Database" to back up your database, then the easiest way to abandon the upgrade is to restore that backup. Complete the following steps:
-
Log in to the system as the owner of the Oracle home directory of the previous release.
-
Sign on to RMAN:
rman "target / nocatalog"
-
Issue the following RMAN commands:
STARTUP NOMOUNT
RUN
{
REPLICATE CONTROLFILE FROM 'save_controlfile_location';
ALTER DATABASE MOUNT;
RESTORE DATABASE FROM TAG before_upgrade
ALTER DATABASE OPEN RESETLOGS;
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-621202/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-621202/