Oracle 資料檔案移動步驟
ORACLE資料檔案移動步驟
一、現建立好目標路徑
二、關閉資料庫和監聽(該庫裡面只有一個使用者表空間為sms所以使用tablespace offline和關閉資料庫的方法所受影響的時間是一樣的)
三、cp原始檔到目標路徑
四、startup mount pfile=$ORACLE_HOME/dbs/initsid.ora 然後使用下面語句更新控制檔案的資訊(如果控制的檔案也要移動的話那麼更改spfile檔案在mount之前)
SQL> select 'alter database rename file '''||file_name||''' to '''||file_name||''' ;' from dba_data_files;
alter database rename file '/data/oradata/caitong/users01.dbf' to '/data1/oradata/caitong/users01.dbf';
alter database rename file '/data/oradata/caitong/sysaux01.dbf' to '/data1/oradata/caitong/sysaux01.dbf';
alter database rename file '/data/oradata/caitong/undotbs01.dbf' to '/data1/oradata/caitong/undotbs01.dbf';
alter database rename file '/data/oradata/caitong/system01.dbf' to '/data1/oradata/caitong/system01.dbf';
alter database rename file '/data/oradata/caitong/sms.dbf' to '/data1/oradata/caitong/sms.dbf';
alter database rename file '/data/oradata/caitong/sms2.dbf' to '/data1/oradata/caitong/sms2.dbf';
alter database rename file '/data/oradata/caitong/sms3.dbf' to '/data1/oradata/caitong/sms3.dbf';
alter database rename file '/data/oradata/caitong/sms4.dbf' to '/data1/oradata/caitong/sms4.dbf';
五、create spfile from pfile
六、shutdown immediate
七、startup
八、select group#,status from v$log
九、alter database drop logfile group 1;
十、alter database add logfiel group 1('$PATH/redo01.log') size 100m
十、select * from database_properties; --檢視臨時表空間
十一、create temporary tablespace new_temp tempfile '$PATH/temp02.dbf' size 2g autoextend off;
十二、alter database default temporary tablespace new_temp;
十三、drop tablespace old_temp including contents and datafiles;
備註:更改使用者預設表空間
alter user username temporary tablespace new_temp
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13879334/viewspace-1034748/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle資料庫啟動步驟Oracle資料庫
- oracle 修改資料檔案位置(路徑)(移動)Oracle
- SQLServer移動資料檔案SQLServer
- 移動端步驟1
- kubernetes-部署Oracle資料庫步驟Oracle資料庫
- 3285.如何通過連結移動外部檔案到空間(步驟)
- oracle資料庫使用者建立步驟Oracle資料庫
- Centos MySQL資料庫遷移詳細步驟CentOSMySql資料庫
- Oracle 資料檔案回收Oracle
- Mysql通過ibd檔案恢復資料的步驟詳解MySql
- ORACLE RAC ASM資料檔案遷移OMF檔案報錯ORA-01276解決OracleASM
- 12c pdb線上移動資料檔案或者重新命名資料檔案
- Oracle DG備庫手動管理新增資料檔案Oracle
- 移動檔案
- Masonite 熟悉步驟小記錄 (三、資料庫遷移)資料庫
- Linux上透過binlog檔案恢復mysql資料庫詳細步驟LinuxMySql資料庫
- java中呼叫dll檔案的步驟Java
- ogg 同步pg資料到oracle--步驟Oracle
- Oracle資料檔案和臨時檔案的管理Oracle
- oracle資料庫的配置檔案Oracle資料庫
- oracle 線上rename資料檔案Oracle
- [20181031]12c 線上移動資料檔案.txt
- PostgreSQL在不同的表空間移動資料檔案SQL
- 修改Oracle資料檔名及資料檔案存放路徑Oracle
- 同版本的庚頓實時資料庫的資料遷移操作步驟資料庫
- git 查詢大檔案、刪除大檔案詳細步驟Git
- oracle徹底刪除資料檔案Oracle
- oracle uncatalog資料庫備份檔案Oracle資料庫
- 【ASK_ORACLE】Relink ASM單例項資料庫詳細步驟OracleASM單例資料庫
- 專案步驟
- Laravel 生成假資料步驟Laravel
- python——批次移動檔案Python
- Oracle12C新特性-線上重新命名遷移資料檔案(一)Oracle
- 達夢資料庫資料檔案遷移過程資料庫
- oracle 新增儲存自動擴充套件資料檔案流程(auto)Oracle套件
- oracle dg庫資料檔案空間不足Oracle
- Oracle10g刪除資料檔案Oracle
- 利用offline datafile檔案方式遷移資料
- 【Oracle】如何修改資料檔案和日誌檔案的路徑Oracle