程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> 導出某個view

導出某個view

編輯:Oracle教程

導出某個view


今天同事問我,如何導出某一個view,我較少見這麼細粒度的需求,果斷測試一下:

[oracle@rac1 log]$ expdp xxx/xxx directory=DATA_PUMP_DIR dumpfile=view.dmp logfile=view_exp.log views=V_TEST
LRM-00101: unknown parameter name 'views'

意料之中,我一點都不失望,因為看help的時候,根本沒有view這個參數。繼續:
[oracle@rac1 log]$ vi par.par 
INCLUDE = VIEW: "in ( 'V_TEST' ) ";

[oracle@rac1 log]$ expdp lm/lm directory=DATA_PUMP_DIR dumpfile=view.dmp logfile=view_exp.log parfile=par.par Export: Release 11.2.0.1.0 - Production on Thu Jan 21 02:07:04 2016 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options Starting "LM"."SYS_EXPORT_SCHEMA_04":  lm/******** directory=DATA_PUMP_DIR dumpfile=view.dmp logfile=view_exp.log parfile=par.par Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 0 KB Processing object type SCHEMA_EXPORT/VIEW/VIEW Master table "LM"."SYS_EXPORT_SCHEMA_04" successfully loaded/unloaded ****************************************************************************** Dump file set for LM.SYS_EXPORT_SCHEMA_04 is:   /u02/app/oracle/product/11.2.0/dbhome_1/rdbms/log/view.dmp Job "LM"."SYS_EXPORT_SCHEMA_04" successfully completed at 02:07:15 OK! 

						

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved