一次expdp/impdp遷移案例
轉載於--->>
因一次硬體原因導致了伺服器異常停機,防止蝴蝶效應及時進行了資料遷移,一週發現了這個決定正確的。
申請了2小時的停機時間。因資料不大且表空間開始使用不規範決定用expdp資料泵方式遷移。
在新裝置
1, raid10+安裝OS
2,安裝oracle 10.2.0.1(single instance)+
3,升級oracle 10.2.0.5
4,建庫,
5, 調整INSTANCE引數,調整temp tbs、redo file size、undo tbs大小
6,建立app schema、建立data\index tablespace
用時1小時左右
stop web app+掛通知
stop listener
sys@TOPBOX>select object_type,count(*) cnt from dba_objects where owner='TOPBOX' GROUP BY OBJECT_TYPE; OBJECT_TYPE CNT ------------------- -------------------- SEQUENCE 802 PROCEDURE 25 DATABASE LINK 2 LOB 3 TRIGGER 3 MATERIALIZED VIEW 2 TABLE 87 FUNCTION 12 VIEW 41 INDEX 142 sys@TOPBOX>@schemas_space SCHEMA Object type Space [MB] ----------------------------------- --------------------------------------------- ----------- ... TOPBOX INDEX 34102.25 LOBINDEX .19 LOBSEGMENT .44 TABLE 31132.69 *********************************** ----------- sum 65235.56 ...
######################
expdp 用時14分鐘
######################
expdp system/xxxxxx schemas=topbox directory=datapump dumpfile=newtopbox%U.dump filesize=5G parallel=6 logfile=topbox_parallel_expdp.log;
[oracle@topbox datapump]$ du newtopbox0*
829016 newtopbox01.dump
5248012 newtopbox02.dump
5248012 newtopbox03.dump
5248012 newtopbox04.dump
4338316 newtopbox05.dump
3681564 newtopbox06.dump
2029228 newtopbox07.dump
673872 newtopbox08.dump
80164 newtopbox09.dump
[oracle@topbox datapump]$ du newtopbox0*|awk ‘{sum += $1};END {print sum}’
27376196
TIP:
DUMP file only contains of indexes metadata data.
#######################
scp 用時11分鐘
#######################
同為兩臺伺服器DELL 2950 ,找個閒置網路卡埠設定任意同網段IP,如192.168.0.1和192.168.0.2,用平時用的交叉線(不一定要直連線)網線不經交換機直連兩臺機器,發現有自適應很方便。
scp傳輸dump檔案到另一臺機器,速度可達40MB/s.
#########################
IMPDP 用時16分鐘 EXCLUDE=STATISTICS,constraint,index
#########################
impdp system/xxxxxxxx directory=datapump dumpfile=newtopbox%U.dump EXCLUDE=STATISTICS,constraint,index remap_tablespace=users:topbox parallel=6
#########################
CREATE ConstraintS and INDEXS
#########################
impdp username/XXXX directory=xxx DUMPFILE=newtopbox%U.dump SQLFILE=create_index.sql INCLUDE=constraint,index remap_tablespace=users:topbox_idx
TIP:
Edit create_index.sql, Replaced the degree of parallel and nologging options
”
Bug 8604502 – IMPDP creates indexes with parallel degree 1 during import
This issue is fixed in:
12.1 (Future Release)
11.2.0.2 (Server Patch Set)
11.2.0.1 Bundle Patch 7 for Exadata Database
11.1.0.7 Patch 24 on Windows Platforms
”
References ‘s post Speed up the index creation.
alter session set workarea_size_policy=MANUAL; alter session set db_file_multiblock_read_count=512; alter session set events '10351 trace name context forever, level 128'; alter session set sort_area_size=734003200; alter session set "_sort_multiblock_read_count"=128; alter session enable parallel ddl; alter session set db_file_multiblock_read_count=512; alter session set db_file_multiblock_read_count=512; alter session set "_sort_multiblock_read_count"=128; alter session set "_sort_multiblock_read_count"=128; spool create_index.log @create_index.sql spool off
#######################
Compile invalid objects
#######################
begin dbms_utility.COMPILE_SCHEMA('TOPBOX'); end /
#########################
Gather Schema Statistics
#########################
begin dbms_stats.gather_schema_stats( ownname => 'TOPBOX', estimate_percent => dbms_stats.auto_sample_size, method_opt => 'for all columns size 1', degree => 7 ); end /
TIP:
METHOD_OPT was ‘FOR ALL COLUMNS SIZE 1′. This basically says to Oracle please only collect basic column statistics (min, max, distinct values etc.), do not collect histograms
on these columns. For columns that are evenly distributed and for columns that are not referenced in SQL statements, this is perfectly adequate. If a column was unevenly
distributed and detrimentally impacted the CBO’s costings of an execution plan, then one could generate histograms for those particular columns separately.
##################
others
##################
Configuration Oracle database automatically with the Linux OS startup and shutdown .
Configuration ORACLE database backup job.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1093967/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用資料泵(expdp、impdp)遷移資料庫流程資料庫
- 使用impdp,expdp資料泵進入海量資料遷移
- 【Datapump】Oracle資料泵遷移資料命令參考(expdp/impdp說明)Oracle
- oracle資料庫的impdp,expdpOracle資料庫
- [20200620]expdp impdp exclude引數.txt
- expdp/impdp變慢 (Doc ID 2469587.1)
- 【Data Pump】expdp/impdp Job基本管理
- expdp/impdp 詳細引數解釋
- Linux下執行資料泵expdp和impdp命令,字元轉義案例兩則Linux字元
- impdp和expdp用法及引數介紹
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- Oracle impdp遷移資料後主鍵丟失故障處理Oracle
- ORACLE EXPDP IMPDP 的停止和啟動及監控Oracle
- EXP、IMP、SQLLOADER、EXPDP、IMPDP、DBMS_METADATA、SQLPLUS等方面SQL
- Oracle 12c expdp和impdp匯出匯入表Oracle
- 資料泵datapump(expdp/impdp)的parfile用法,避免跳脫字元字元
- 記一次 GitLab 的遷移過程Gitlab
- 單體JOB向分散式JOB遷移案例分散式
- 記一次遷移和效能最佳化
- oracle dblink用法總結和expdp和impdp利用dblink倒入匯出到本地Oracle
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- 記錄一次XTTS遷移碰到的問題TTS
- 案例分析:700G SQL Server資料庫遷移HGSQLServer資料庫
- RMAN備份恢復典型案例——跨平臺遷移pdb
- 【Golang+mysql】記一次mysql資料庫遷移(一)GolangMySql資料庫
- 記錄一次餘額遷移的坑(測試角度)
- 記一次快取伺服器遷移史,心塞!快取伺服器
- 棧遷移
- 遷移公告
- 昇騰遷移丨4個TensorFlow模型訓練案例解讀模型
- 記錄一次遷移環境 .env 出現的問題
- 【遷移】SqlServer 遷移到 MySQL 方法ServerMySql
- oracle10g expdp資料泵的bug,按schema匯出,匯入impdp時無jobOracle
- 太強了!分散式Elasticsearch叢集資料遷移企業案例分散式Elasticsearch
- 實踐案例:平安健康的 Dubbo3 遷移歷程總結
- 乾貨 | 攜程一次Redis遷移容器後Slowlog“異常”分析Redis
- [Database Migration] 記一次未達預期的資料庫遷移Database資料庫
- 一次基於AST的大規模程式碼遷移實踐AST
- 記一次 Laravel 專案遷移之後 Model 報錯問題Laravel