Adım-1
1 |
alter tablespace xxxxxxxxx offline; |
Adım-2
1 |
$mv /u01/app/oracle/oradata/orcl/satis01_tbs.dbfu01/app/oracle/oradata/orcl/satis_200901_tbs.dbf |
veya güvenli olması için
1 |
cp /u01/app/oracle/oradata/orcl/satis_200901_tbs.dbf /u01/app/oracle/oradata/orcl/satists |
kopyalamadan sonra sil
Adım-3
1 2 3 4 5 6 7 |
alter tablespace satis_2009 rename datafile '/u01/app/oracle/oradata/orcl/satis01_tbs.dbf' '/u01/app/oracle/oradata/orcl/satis02_tbs.dbf' to '/u01/app/oracle/oradata/orcl/satis_200901_tbs.dbf' '/u01/app/oracle/oradata/orcl/satis_200902_tbs.dbf' |
Adım-4
1 |
alter tablespace xxxxxxxxx online; |
Temp TableSpace
1 2 3 4 5 |
shutdown immediate $mv /u01/app/oracle/oradata/xxxxx.dbf /utemp/app/oracle/oradata/ startup mount alter database rename file '/u01/app/oracle/oradata/xxxxx.dbf' to '/utemp/app/oracle/oradata/xxxxx.dbf'; alter database open; |
Undo
1 2 3 4 5 |
1. Shutdown the database 2. Move the datafile to its new location. 3. Do a "STARTUP MOUNT" 4. ALTER DATABASE RENAME FILE '/old/location' TO '/new/location'; 5. ALTER DATABASE OPEN; |
1 |
alter database rename file 'D:ORACLEPRODUCT10.2.0ORADATATESTUNDOTBS01.DBF' to 'D:ORACLEPRODUCT10.2.0ORADATATESTUNDOTBS02.DBF'; |
Sorgular
13 Mart 2019