匯入表的部分資料到測試環境
匯入表的部分資料到測試環境
開發人員發現在生產庫有些資料有問題,需要測試是否功能有問題,但由於生產環境不能直接進行測試,只好把資料匯入到測試環境來測試。
下面描述通過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
- 如何通過 Excel import 的方式匯入測試資料到 SAP Commerce Cloud 伺服器ExcelImportCloud伺服器
- Python批量匯入Excel資料到MySQLPythonExcelMySql
- logstash匯入movielens測試資料
- 配置開發環境、生成環境、測試環境開發環境
- 2024版Pycharm匯入conda環境PyCharm
- sqoop1.4.7環境搭建及mysql資料匯入匯出到hiveOOPMySqlHive
- EVE-NG的環境匯入QEMU元件元件
- 極速匯入elasticsearch測試資料Elasticsearch
- 利用Excel匯入資料到SAP C4CExcel
- 使用Excel匯入資料到SAP Cloud for Customer系統ExcelCloud
- 如何搭建良好的軟體測試環境?測試環境對軟體測試起到什麼作用?
- Windows配置Delve的測試環境Windows
- android測試環境搭建Android
- Xcode配置測試環境和線上環境XCode
- 匯入視訊測試
- OpenCV入門:環境配置與測試(VS2017)OpenCV
- Sql多個表部分資料匯入匯出(臨時想的,暫沒想到其他辦法)SQL
- 用 Spring 區分開發環境、測試環境、生產環境Spring開發環境
- spark sql與mysql 資料載入與匯出資料到mysqlSparkMySql
- Windows環境下,.lib匯入庫 詳解Windows
- Sqoop匯出ClickHouse資料到HiveOOPHive
- 新手搭建 kubernetes 測試環境
- kaldi環境搭建 | yesno 測試
- Django測試環境準備Django
- Java 匯入資料到Excel並提供檔案下載介面JavaExcel
- Excel 表匯入資料Excel
- 將新建的虛擬環境匯入jupyter notebook中使用
- Windows環境下,動態連結庫(DLL)的“匯入”與“匯出”概念Windows
- 軟體測試培訓:如何搭建測試環境
- app自動化測試環境配置:adb環境配置、monkey環境配置、appium環境配置大全APP
- 虛擬化環境下的效能測試
- 各種環境下的滲透測試
- Django入門指南-第1部分(環境搭建)Django
- 神通資料庫測試環境調優過程資料庫
- 搭建自動化測試環境
- 本地測試環境初始化
- griffin環境搭建及功能測試