Step1: Move tablespace offline through database command
SQL> alter tablespace USERS offline;
Tablespace altered.
Step2: Move tablespace offline through os command
SQL> !
[oracle@oracledb32 oracledb]$ mv /oracledb/oradata/stlbas/users01.dbf /home/oracle/users01.dbf
[oracle@oracledb32 oracledb]$
[oracle@oracledb32 oracledb]$ exit
exit
Step3: rename datafile
SQL> alter database rename file '/oracledb/oradata/stlbas/users01.dbf' to '/home/oracle/users01.dbf';
Database altered.
Step4: Move tablespace USERS online
SQL> alter tablespace USERS online;
Tablespace altered.
SQL>
--thats it....
SQL> alter tablespace USERS offline;
Tablespace altered.
Step2: Move tablespace offline through os command
SQL> !
[oracle@oracledb32 oracledb]$ mv /oracledb/oradata/stlbas/users01.dbf /home/oracle/users01.dbf
[oracle@oracledb32 oracledb]$
[oracle@oracledb32 oracledb]$ exit
exit
Step3: rename datafile
SQL> alter database rename file '/oracledb/oradata/stlbas/users01.dbf' to '/home/oracle/users01.dbf';
Database altered.
Step4: Move tablespace USERS online
SQL> alter tablespace USERS online;
Tablespace altered.
SQL>
--thats it....
No comments:
Post a Comment