一、实验环境
平台:VMware Server 1.0.6 Linux 2.6.18-164 el5
DB Version: Oracle 10g 10.2.0.1
Oracle SID: orcl
数据库运行在归档模式
sys@ORCL>
LOG_MODE
------------
或者:
源数据库数据文件位置:
实验中想把数据文件迁移到的位置:
源数据库数据文件位置:
sys@ORCL>
FILE_NAME
----------------------------------------
/u01/oradata/orcl/system01.dbf
/u01/oradata/orcl/undotbs01.dbf
/u01/oradata/orcl/sysaux01.dbf
/u01/oradata/orcl/users01.dbf
sys@ORCL> select file_name from dba_temp_files;
FILE_NAME
----------------------------------------
/u01/oradata/orcl/temp01.dbf
sys@ORCL> col member for a30
sys@ORCL> select member from v$logfile ;
MEMBER
------------------------------
/u01/oradata/orcl/redo01.log
/u01/oradata/orcl/redo02.log
/u01/oradata/orcl/redo03.log
需要移动所有的数据文件,采用alter database 方法
1、关闭数据库
sys@ORCL> Database closed.
Database dismounted.
ORACLE instance shut down.
2、移动数据文件到目录
[oracle@ora10gserv orcl]$ [oracle@ora10gserv orcl]$ [oracle@ora10gserv orcl]$ ls
[oracle@ora10gserv orcl]$ [oracle@ora10gserv orcl_test]$ ls
3、修改控制文件位置
[oracle@ora10gserv /]$
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 2 00:05:27 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 465567744 bytes
Fixed Size 1220024 bytes
Variable Size 146801224 bytes
Database Buffers 314572800 bytes
Redo Buffers 2973696 bytes
SQL>
File created.
SQL>
orcl.__db_cache_size=314572800
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=138412032
orcl.__streams_pool_size=0
*.audit_file_dest='/dba/admin/orcl/adump'
*.background_dump_dest='/dba/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_file_record_keep_time=14
*.core_dump_dest='/dba/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain='lsf.com.cn'
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.db_recovery_file_dest='/dba/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.log_archive_dest_1='location=/u01/arch_orcl'
*.open_cursors=300
*.pga_aggregate_target=154140672
*.processes=1000
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=2000
*.sga_target=463470592
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/dba/admin/orcl/udump'
SQL> ORA-01507: database not mounted
ORACLE instance shut down.
SQL>
File created.