Professional Documents
Culture Documents
StepbyStep To 11gr2
StepbyStep To 11gr2
=================
1) Copy the Pre-Upgrade Information Tool (utlu112i.sql) from the Oracle Database
11g Release 2 (11.2) ORACLE_HOME/rdbms/admin directory to a directory outside
of the Oracle Home, such as the temporary directory on your system. /tmp/upgrade
SELECT TO_NUMBER('MUST_BE_SAME_TIMEZONE_FILE_VERSION')
FROM registry$database
WHERE tz_version != (SELECT version from v$timezone_file);
2) Change to the directory where utlu112i.sql had been copied in the previous step.
cd /tmp/upgrade
spool upgrade_info.log
@utlu112i.sql
spool off
3) Check the spool file and examine the output of the Upgrade Information Tool.
Note 1358166.1 : Actions For DST Updates When Upgrading To Or Applying The 11.2.0.3
Patchset
select TZ_VERSION from registry$database;
Note 870877.1 How To Save Oracle Enterprise Manager Database Control Data Before
Upgrading The Single Instance Database To Other Release?
$ emdwgrd -save -cluster -sid old_SID -path save_directory
Spool analyze.sql
spool off
@analyze.sql
SQL> select
s.obj#,o.obj#,s.containerobj#,lastrefreshdate,pflags,xpflags,o.name,o.owner#,
bitand(s.mflags, 8)
from obj$ o, sum$ s
where o.obj# = s.obj# and o.type# = 42 AND bitand(s.mflags, 8) = 8; -- sin datos
SELECT local_tran_id
FROM dba_2pc_pending;
EXECUTE dbms_transaction.purge_lost_db_entry('');
COMMIT;
SELECT owner,tablespace_name
FROM dba_tables
WHERE table_name='AUD$';
SQL> SELECT name FROM v$controlfile;
SQL> SELECT file_name FROM dba_data_files;
SQL> SELECT group#, member FROM v$logfile;
lsnrctl stop
Sample /etc/oratab
#orcl:/opt/oracle/product/10.2/db_1:N
orcl:/opt/oracle/product/11.2/db_1:N
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> startup UPGRADE
SQL> @catuppst.sql
Make sure the following environment variables point to the Oracle 11g Release 2
(11.2) directories:
- ORACLE_BASE
- ORACLE_HOME
- PATH, LD_LIBRARY_PATH, SHLIB_PATH and LIBPATH (for AIX)
- Check that your oratab file
SQL> BEGIN
DBMS_DST.FIND_AFFECTED_TABLES
(affected_tables => 'sys.dst$affected_tables',
log_errors => TRUE,
log_errors_table => 'sys.dst$error_table');
END;
/
PL/SQL procedure successfully completed.
EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('SYS','dictstattab');