move datafile


sqlplus / as sysdba;
shut imemdiate
exit
mv /u01/app/oracle/oradata/ANARDB/system01.dbf /data/ANARDB/datafile/system01.dbf
mv /u01/app/oracle/oradata/ANARDB/sysaux01.dbf /data/ANARDB/datafile/sysaux01.dbf
mv /u01/app/oracle/oradata/ANARDB/undotbs01.dbf /data/ANARDB/datafile/undotbs01.dbf
mv /u01/app/oracle/oradata/ANARDB/users01.dbf /data/ANARDB/datafile/users01.dbf
mv /u01/app/oracle/oradata/ANARDB/temp01.dbf /data/ANARDB/datafile/temp01.dbf
sqlplus / as sysdba;
startup mount
alter database rename file '/u01/app/oracle/oradata/ANARDB/system01.dbf' to '/data/ANARDB/datafile/system01.dbf';
alter database rename file '/u01/app/oracle/oradata/ANARDB/sysaux01.dbf' to '/data/ANARDB/datafile/sysaux01.dbf';
alter database rename file '/u01/app/oracle/oradata/ANARDB/undotbs01.dbf' to '/data/ANARDB/datafile/undotbs01.dbf';
alter database rename file '/u01/app/oracle/oradata/ANARDB/users01.dbf' to '/data/ANARDB/datafile/users01.dbf';
alter database rename file '/u01/app/oracle/oradata/ANARDB/temp01.dbf' to '/data/ANARDB/datafile/temp01.dbf';
alter database open

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: