Previous | Table of Contents | Next |
You are now at a point of no return.
It is at this stage that new control files are created and all the headers of the online datafile undergo transformation as per information provided in the convSID.dbf file. If you are not successful in executing this command, or if you want to go back to Oracle7, you need to restore all the files for tablespaces that were online when you initiated this process. Also, you must restore the convert file and delete the control file that might have been partially created.
In order to open the database, execute the regular command with the resetlog option:
svrmgrl> Alter database open resetlogs;
This causes all the online rollback segments to be converted to the Oracle8 format and automatically generates the new online redologs.
In the final stage, you run the cat8000.sql scripts to create the system data dictionary and catalog views for Oracle8. Before the scripts are executed, it is always a good idea to have a SPOOL file open so that the error log can be created, which is very helpful for debugging any errors that might occur during the execution of these scripts:
svrmgrl> SPOOL SAMSLOG svrmgrl> @$ORACLE_HOME/rdbms/admin/cat8000.sql
This drops the migrate user and creates and alters some objects. Finally, run cat8003.sql and cat8000s.sql. These scripts run catalog.sql and catproc.sql scripts and take the database to the 8.0.3 version.
If you want to install the advanced replication option, run CATREP8.sql also:
svrmgrl> SPOOL OFF
At this stage, all packages, procedures, functions, triggers, and views need to be recompiled. You cannot just run dbms_utility.compile_schema, because the migration does not track dependencies.
It is a good idea to check for invalid objects and recompile them using the following script, which does take care of the dependencies:
/* ------------ Script to recompile the invalid Objects ------------*/ set heading off set pagesize 0 set linesize 79 set verify off set echo off spool compile_all_objects.tmp select decode( OBJECT_TYPE, PACKAGE BODY, alter package || OWNER||.||OBJECT_NAME || compile body;, alter || OBJECT_TYPE || || OWNER||.||OBJECT_NAME || compile;) from sys.dba_objects a, sys.order_object_by_dependency b where A.OBJECT_ID = B.OBJECT_ID(+) and STATUS = INVALID and OBJECT_TYPE in ( PACKAGE BODY, PACKAGE, FUNCTION, PROCEDURE, TRIGGER, VIEW ) order by DLEVEL DESC, OBJECT_TYPE, OBJECT_NAME; spool off; -------------------------
You can execute the this script connected as System. This generates a compile_all_objects.tmp file.
Rename compile_all_objects.tmp to compile.sql, which can be executed to fix the invalid objects getting connected as svrmgrl.
Because this script checks for the dependencies, make sure that this is excuted only once. It should normally fix all the invalid objects in the database. You do not need to compile each user schema separately.
At this stage, shut down normal or immediate. This flushes all caches, clears buffers, and performs other housekeeping duties, such as alters online your offline files (the file headers will be altered for Oracle8).
If you want to upgrade to 8.0.4, you need to run the scripts accordingly and call Support to get patches for some of the fixes. There are some patches that need to be installed for 8.0.3; a list of these can be requested from Worldwide Support.
Abandoning the Migration
Once you execute the migrate utility, it eliminates the Oracle7 catalog views. Therefore, to return to the Oracle7 database after the utility has been run, you restore the Oracle7 catalog views by rerunning the CATALOG.SQL script. The steps are as follows:
Svrmgrl> Connect internal; svrmgrl> Startup
svrmgrl> drop user migrate cascade;
svrmgrl> @$ORACLE_HOME/rdbms/admin/Catalog.sql svrmgrl> @$ORACLE_HOME/rdbms/admin/Catproc.sql svrmgrl> catsvrmg.sql ( if the server manager is installed) svrmgrl> @$ORACLE_HOME/rdbms/admin/CatPARR.sql ( if parallel option is installed) svrmgrl> @$ORACLE_HOME/rdbms/admin/CatREP.sql ( if replication option is installed)
Previous | Table of Contents | Next |