Home > Oracle > Moving a datafile to another ASM group

Moving a datafile to another ASM group

# set tablespace read only
sqlplus
connect / as sysdba
alter tablespace E5DATA read only;

# datafile offline
alter database datafile ‘+DATA/hake52ts/datafile/e5data.536.701889395’ offline;

# copy datafile
RMAN
connect target /
copy datafile ‘+DATA/hake52ts/datafile/e5data.536.701889395’ to ‘+DATA2’;

# rename datafile
switch datafile ‘+DATA/hake52ts/datafile/e5data.536.701889395’ to copy;
# or
alter database rename datafile
‘+DATA/hake52ts/datafile/e5data.536.701889395’
to
‘+DATA2/hake52ts/datafile/e5data……’;

# recover datafile
recover datafile ‘+DATA2/hake52ts/datafile/e5data………..’;

# datafile online
sqlplus
connect / as sysdba
alter database datafile ‘+DATA2/hake52ts/datafile/e5data………..’ online;

# tablespace read write
alter tablespace E5DATA  read write;

Advertisements
Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

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: