Copy Tablespace to ASM

In order to copy a tablespace to ASM diskgroup, RMAN is the only utility that can be used. Here is an example on how to do it.

--Take the tablespace offline
sql 'alter tablespace name offline';

--Back it up as copy onto ASM diskgroup. This creates an image copy
backup as copy tablespace name format '+DATA02';


--Now just tell the controlfile that you will use new copy as your tablespace
switch tablespace name to copy;


--Bring the tablespace back online
sql 'alter tablespace name online';



Same can be done for datafiles as well. Also this can be used to copy or move a tablespace or datafile from one diskgroup to another.

No comments:

Post a Comment