ta/easy/sysaux01.dbf',
'/oradata/easy/users01.dbf'
CHARACTER SET ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1_%u_.arc';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/flash_recovery_area/EASY/archivelog/2014_11_05/o1_mf_1_1_%u_.arc';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/easy/temp01.dbf'
SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
-- End of tempfile additions.
--
3: 查看当前的数据库状态
SQL> select count(*) from dba_objects where status ='INVALID';
COUNT(*)
----------
0
SQL> select comp_name,status from dba_registry;
COMP_NAME STATUS
---------------------------------------- ----------------------
Oracle Database Catalog Views VALID
Oracle Database Packages and Types VALID
Oracle Workspace Manager VALID
JServer JAVA Virtual Machine VALID
Oracle XDK VALID
Oracle Database Java Packages VALID
Oracle Expression Filter VALID
Oracle Data Mining VALID
Oracle Text VALID
Oracle XML Database VALID
Oracle Rules Manager VALID
COMP_NAME STATUS
---------------------------------------- ----------------------
Oracle interMedia VALID
OLAP Analytic Workspace VALID
Oracle OLAP API VALID
OLAP Catalog VALID
Spatial VALID
Oracle Enterprise Manager VALID
17 rows selected.
4:拷贝参数文件,控制文件,数据文件,日志文件到64位数据库
5:在64位系统上创建相应目录,如udmp adump等,要和32位系统一致
6:如果数据库的数据文件目录发生变化,则需要新建控制文件,(最好保持源库和目标库的一致,减少工作量和错误发生率)
7:将数据库中的存储过程等置为失效,UTLIRP脚本会将存储过程等置为失效
--如果迁移的是oracle9i的数据库,执行如下命令:
SQL> STARTUP MIGRATE
--如果是Oracle10g或11g,执行如下命令:
SQL> STARTUP UPGRADE
SQL> SPOOL EASY.log;
SQL> @$ORACLE_HOME/rdbms/admin/utlirp.sql
SQL> SPOOL OFF;
8: 重新启动数据库,
9: 如果数据库有OLAP组件,则删除OLAP,以sys用户执行如下脚本
SQL> conn / as sysdba
----> Remove OLAP Catalog
SQL> @ /olap/admin/catnoamd.sql
----> Remove OLAP API
SQL> @ /olap/admin/olapidrp.plb
SQL> @ /olap/admin/catnoxoq.sql
----> Deinstall APS - OLAP AW component
SQL> @ /olap/admin/catnoaps.sql
SQL> @ /olap/admin/cwm2drop.sql ---只需要在11g中执行。在10g中,catnoamd.sql 脚本中已经包含了该脚本,所以不用执行
You could getsome invalid objects under SYS and PUBLIC owner, and they are the old duplicate OLAPSYS objects copied under these schemas when Olap has been installedpreviously.
Generally, theOlap objects are named with context like %OLAP%, %AWM%, or other Olap word keys intheir "object_name" field, however, if it needs a help to recognizethem, then please contact Oracle Support and create a Service Request toget assistance for this question.
Note that catnoadm.sql could fail from 10.1.0.5 to 11.1.0.7release.
Due to the factthat it refers to three scripts which don't g