官方文档:
- goal: How to Relocate and Rename SYSTEM datafiles
- fact: Oracle Server - Enterprise Edition
SQL> select tablespace_name,file_name from dba_data_files;
TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
USERS
/u01/app/oracle/oradata/orcl/users01.dbf
UNDOTBS1
/u01/app/oracle/oradata/orcl/undotbs01.dbf
SYSAUX
/u01/app/oracle/oradata/orcl/sysaux01.dbf
TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
SYSTEM
/u01/app/oracle/oradata/orcl/system01.dbf
TBS_DATA
/u01/app/oracle/oradata/orcl/tbs_data01.dbf
UNDOTBS1
/u01/app/oracle/oradata/orcl/undotbs02.dbf
6 rows selected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 776646656 bytes
Fixed Size 2257272 bytes
Variable Size 507514504 bytes
Database Buffers 264241152 bytes
Redo Buffers 2633728 bytes
Database mounted.
[oracle@orcl orcl]$ cp system01.dbf /u01/app/oracle/system01.dbf
SQL>alter database rename file '/u01/app/oracle/oradata/orcl/system01.dbf' to '/u01/app/oracle/system01.dbf';
Database altered.
SQL> alter database open;
Database altered.
SQL> select tablespace_name,file_name from dba_data_files where tablespace_name='SYSTEM';
TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
SYSTEM
/u01/app/oracle/system01.dbf