Thursday, 2 October 2014

RMAN Automatic Script : Restore & Recover tablespace

export ORACLE_SID=TEST2

rman <<EOF
connect target rman/rman_oracledba@test2
connect catalog rman/rman_oracledba@test1
run { allocate channel d1 type disk;
sql 'Alter tablespace data offline';
restore tablespace data;
recover tablespace data;
sql 'Alter tablespace data online';
}
EOF

No comments:

Post a Comment