1. 迁移
数据库的迁移,不管是出于什么原因和需要的进行,唯一需要考虑的两个因素就是:停机时间和存储容量。因为这两个因素往往决定了你可以采用什么样的方式进行数据库迁移:如果停机时间不充裕,可以选择热迁移,但是要求足够的存储空间;如果存储容量不足,可以选择冷迁移,但是要求足够充裕的停机时间。上述两个因素是相互制约的。
下面的例子将多种方式进行迁移试验,从OS File System到ASM,或者反之;从表空间、数据文件和数据库层面。
1.0. 数据库环境
环境为Linux 5.7 x64+Oracle 10.2.0.5 x64+4块1Gb磁盘
[oracle@gtser1 gt10g]$ uname -a
Linux gtser1 2.6.32-200.13.1.el5uek #1 SMP WedJul 27 21:02:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[oracle@gtser1 gt10g]$ cat /etc/issue
Oracle Linux Server release 5.7
Kernel \r on an \m
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
1.2.0. 表空间、数据文件迁移-从文件系统到ASM
[oracle@gtser1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.5.0 - Production on MonFeb 25 15:09:59 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Rea