匯入表的部分資料到測試環境
匯入表的部分資料到測試環境
開發人員發現在生產庫有些資料有問題,需要測試是否功能有問題,但由於生產環境不能直接進行測試,只好把資料匯入到測試環境來測試。
下面描述通過exp 的query引數來完成這個任務。
在生產環境上編輯如下的exp.par 引數檔案:
tables=sum50a.zbindb
file=pdm.dmp
log=pdm.log
query=" where bid ='tbpcCAkh3cpdmsum50a--g5q'"
buffer=32680000
注意query的寫法。
生成dmp檔案
exp \'/ as sysdba\' parfile=exp.par
下面是執行的過程:
Export: Release 9.2.0.8.0 - Production on Fri Jan 16 09:28:16 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16CGB231280 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
Current user changed to SUM50A
. . exporting table ZBINDB 1 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
ftp到測試環境,匯入到測試環境。
編輯imp.par 引數檔案:
fromuser=sum50a
touser=sum50a
file=/orabak/pdm.dmp
ignore=y
注意:一定要加上ignore 引數,否則imp會報錯:表已經存在,不能再次匯入。
加入ignore 引數可以跳過該錯誤。
不加ignore 引數時的錯誤:
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
import server uses ZHS16CGB231280 character set (possible charset conversion)
export client uses US7ASCII character set (possible charset conversion)
. importing SUM50A's objects into SUM50A
IMP-00015: following statement failed because the object already exists:
"CREATE TABLE "ZBINDB" ("OBID" VARCHAR2(24), "ZBINDATA" LONG, "ZLEN" NUMBER("
"*,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 "
"FREELISTS 1 FREELIST GROUPS 1) LOGGING NOCOMPRESS"
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/40239/viewspace-557985/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQLServer匯出匯入資料到MySQLServerMySql
- SOA 環境中的測試驅動的開發,第 1 部分: 測試資料對映
- Oracle imp 匯入資料到另一個表空間Oracle
- 使用mysqlimport匯入資料到mysqlMySqlImport
- 測試環境匯出至開發環境過程記錄 expdp、impdp開發環境
- 使用EXPDP/IMPDP匯入匯出表中資料/後設資料測試
- 匯入網頁資料到 Google Sheet網頁Go
- 從EXCEL匯入資料到SQL SERVERExcelSQLServer
- 使用sqlldr匯入文字資料到oracleSQLOracle
- [pb]從excel匯入資料到datawindowExcel
- Timesten匯入資料到Cache Group
- sqlldr批量匯入匯出資料測試SQL
- sqlldr批次匯入匯出資料測試SQL
- 如何通過 Excel import 的方式匯入測試資料到 SAP Commerce Cloud 伺服器ExcelImportCloud伺服器
- 測試移動blob型別的資料到新的表空間型別
- expdp匯出表的部分資料
- Python批量匯入Excel資料到MySQLPythonExcelMySql
- 使用load data匯入資料到mysqlMySql
- logstash匯入movielens測試資料
- 極速匯入elasticsearch測試資料Elasticsearch
- 如何搭建良好的軟體測試環境?測試環境對軟體測試起到什麼作用?
- 採用importtsv匯入外部資料到hbase中ImportTTS
- Xcode配置測試環境和線上環境XCode
- EVE-NG的環境匯入QEMU元件元件
- rac環境下使用impdp匯入資料出錯
- Sqlserver資料寫入表測試SQLServer
- mysql匯出某個表的部分資料MySql
- sqoop1.4.7環境搭建及mysql資料匯入匯出到hiveOOPMySqlHive
- Progress資料表的匯入匯出
- 利用Excel匯入資料到SAP C4CExcel
- 資料庫SQL Server DAC 匯入匯出資料到SQL Azure問題資料庫SQLServer
- kaldi環境搭建 | yesno 測試
- android測試環境搭建Android
- Windows配置Delve的測試環境Windows
- OCM實驗-測試環境的搭建
- 搭建rac+DataGuard的測試環境
- mysqlimport匯入簡單測試MySqlImport
- EXP,EXPDP資料匯入本地效能測試