在这之后,把linux服务器上的数据库和实例名从大写的ORCL改为小写的orcl,并修改了所有的参数文件内容和密码文件重新解压缩冷备份的数据文件,并重新生成控制文件,使用REUSE生成
CREATE CONTROLFILE REUSE DATABASE "orcl" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/Oracle/oradata/orcl/REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl/REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl/REDO03.LOG' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl/SYSTEM01.DBF',
'/u01/app/oracle/oradata/orcl/SYSAUX01.DBF',
'/u01/app/oracle/oradata/orcl/UNDOTBS01.DBF',
'/u01/app/oracle/oradata/orcl/USERS01.DBF',
'/u01/app/oracle/oradata/orcl/EXAMPLE01.DBF'
CHARACTER SET AL32UTF8
;
然后:
SYS@orcl>shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SYS@orcl>startup upgrade
ORACLE instance started.
Total System Global Area 1724186624 bytes
Fixed Size 1337016 bytes
Variable Size 1040189768 bytes
Database Buffers 671088640 bytes
Redo Buffers 11571200 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SYS@orcl>alter database open resetlogs upgrade;
Database altered.
竟然打开了!!为什么??
但之后
SYS@orcl>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcl>startup
ORACLE instance started.
Total System Global Area 1724186624 bytes
Fixed Size 1337016 bytes
Variable Size 1040189768 bytes
Database Buffers 671088640 bytes
Redo Buffers 11571200 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 7775
Session ID: 125 Serial number: 5
startup upgrade就可以打开数据库:
为什么?
SYS@orcl>startup upgrade
ORACLE instance started.
Total System Global Area 1724186624 bytes
Fixed Size 1337016 bytes
Variable Size 1040189768 bytes
Database Buffers 671088640 bytes
Redo Buffers 11571200 bytes
Database mounted.
Database opened.
SYS@orcl>
执行catupgrd.sql失败,应该是因为Linux的Oracle 11g版本低于Windows 11g。
网上有这么一段,用于编译32位、64位平台的存储过程,因本次克隆没有自编译的存储过程,因此不需要执行。
2) run $ORACLE_HOME/rdbms/admin/utlirp.sql <---- UTLIRP.sql (to migrate from 32 bit to 64 bit)
3) shut immediate
4) startup
5)run $ORACLE_HOME/rdbms/admin/utlrp.sql
??
是因为64->32的缘故?还是因为平台的缘故?考虑用rman convert的方法重新做一次。
SYS@orcl>SELECT * FROM V$TRANSPORTABLE_PLATFORM order by ENDIAN_FORMAT;
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- ----------------------------------------------------------------------------------------------------- --------------
3 HP-UX (64-bit) Big
6 AIX-Based Systems (64-bit) Big
18 IBM Power Based Linux Big
2 Solaris[tm] OE (64-bit) Big
4 HP-UX IA (64-bit) Big
16 Apple Mac OS Big
1 Solaris[tm] OE (32-bit) Big
9 IBM zSeries Based Linux Big
17 Solaris Operating System (x86) Little
19 HP IA Open VMS Little
20 Solaris Operating System (x86-64) Little
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- ----------------------------------------------------------------------------------------------------- --------------
12 Microsoft Windows x86 64-bit Little
13 Linux x86 64-bit Little
8 Microsoft Windows IA (64-bit) Little
21 Apple Mac OS (x86-64) Little
11 Linux IA (64-bit) Little
5 HP Tru64 UNIX Little
10 Linux IA (32-bit) Little
7 Microsoft Windows IA (32-bit) Little
15 HP Open VMS Little
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
