Friday, August 16, 2013

Move Rename Oracle System datafile


$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 16 10:46:20 2013

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

SQL> select file_name from dba_data_files where tablespace_name='SYSTEM';

FILE_NAME
--------------------------------------------------------------------------------
/oracle_drives/cca_data/SCAORA1/datafile/o1_mf_system_904ml42n_.dbf

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 4,2950E+10 bytes
Fixed Size 2175824 bytes
Variable Size 4,2346E+10 bytes
Database Buffers 587202560 bytes
Redo Buffers 14598144 bytes
Database mounted.
SQL> ! cp /oracle_drives/cca_data/SCAORA1/datafile/o1_mf_system_904ml42n_.dbf /oracle_drives/oracle_sys/system001.dbf;

SQL> alter database rename file '/oracle_drives/cca_data/SCAORA1/datafile/o1_mf_system_904ml42n_.dbf' to '/oracle_drives/oracle_sys/system001.dbf';

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> select file_name from dba_data_files where tablespace_name='SYSTEM';

FILE_NAME
--------------------------------------------------------------------------------
/oracle_drives/oracle_sys/system001.dbf

1 comment:

  1. Just kidding. I'll be new to this discussion board but have belonged into a great deal of other people. Desire for getting capable to empower many of you and anticipate you could assist me should the will want occur.

    ReplyDelete