Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Steps to rename datafile using RMAN.

$
0
0
Please execute the below in rman.

run
{
sql 'alter database datafile 12 offline';
COPY DATAFILE 12 TO '/u01/oracle/oradata/USERS04.DBF';
set newname for datafile 12 to '/u01/oracle/oradata/USERS04.DBF';
switch datafile 12;
recover datafile 12;
sql 'alter database datafile 12 online';
}

select FILE_NAME,FILE_ID,TABLESPACE_NAME,status from dba_data_files where FILE_NAME='/u01/oracle/oradata/USERS04.DBF';

select file#,name,enabled from v$datafile where name='/u01/oracle/oradata/USERS04.DBF';

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>