91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

expdp如何導出表空間

發布時間:2021-11-12 09:12:45 來源:億速云 閱讀:714 作者:小新 欄目:關系型數據庫

這篇文章給大家分享的是有關expdp如何導出表空間的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。



下面我們來測試一下:

創建一個表空間,此處省略。  我創建幾張表,并且創建一個分區表
,語句如下:  分區使用了兩個表空間,TEST 和USERS


點擊(此處)折疊或打開

  1. CREATE TABLE scott.obj_part

  2. PARTITION BY RANGE (created)

  3. (

  4.  PARTITION p20101231 VALUES LESS THAN (to_date('20101231','yyyymmdd')) tablespace test,

  5.  PARTITION p20111231 VALUES LESS THAN (to_date('20111231','yyyymmdd')) tablespace test,

  6.  PARTITION p20121231 VALUES LESS THAN (to_date('20121231','yyyymmdd')) tablespace users,

  7.  PARTITION p20131231 VALUES LESS THAN (to_date('20131231','yyyymmdd')) tablespace users,

  8.  PARTITION p20141231 VALUES LESS THAN (to_date('20141231','yyyymmdd')) tablespace users,

  9.  PARTITION p20151231 VALUES LESS THAN (to_date('20151231','yyyymmdd')) tablespace users,

  10.  PARTITION p20161231 VALUES LESS THAN (to_date('20161231','yyyymmdd')) tablespace users,

  11.  PARTITION p20171231 VALUES LESS THAN (to_date('20171231','yyyymmdd')) tablespace users

  12. )

  13. as select * from dba_objects where 1=0


插入數據:

點擊(此處)折疊或打開

  1. SQL> insert into scott.obj_part select * from dba_objects;


  2. 86383 rows created.


  3. SQL> commit;


  4. Commit complete.


  5. SQL> conn test/test

  6. Connected.

  7. SQL> insert into scott.obj_part select OWNER,OBJECT_NAME,SUBOBJECT_NAME,OBJECT_ID,DATA_OBJECT_ID,OBJECT_TYPE,to_date('2017-5-12','yyyy-mm-dd'),LAST_DDL_TIME,TIMESTAMP,STATUS,TEMPORARY,GENERATED,SECONDARY,NAMESPACE,EDITION_NAME from dba_objects;


  8. 86383 rows created.


  9. SQL> commit;


  10. Commit complete.


  11. SQL> create index scott.objpart_id on scott.obj_part(object_id) tablespace test;


  12. Index created.


  13. SQL> commit;


  14. Commit complete.


執行導出

點擊(此處)折疊或打開

  1. [oracle@mystandby dump]$ expdp \' / as sysdba\' directory=sh_dmp dumpfile=exp_tablespace01.dmp logfile=exptablesp01.log tablespaces=test


  2. Export: Release 11.2.0.4.0 - Production on Thu Aug 10 20:40:29 2017


  3. Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


  4. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

  5. With the Partitioning, OLAP, Data Mining and Real Application Testing options

  6. Starting "SYS"."SYS_EXPORT_TABLESPACE_01": "/******** AS SYSDBA" directory=sh_dmp dumpfile=exp_tablespace01.dmp logfile=exptablesp01.log tablespaces=test

  7. Estimate in progress using BLOCKS method...

  8. Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

  9. Total estimation using BLOCKS method: 36.12 MB

  10. Processing object type TABLE_EXPORT/TABLE/TABLE

  11. Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

  12. Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

  13. Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

  14. Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

  15. Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

  16. . . exported "SCOTT"."OBJ_PART":"P20131231" 8.358 MB   86200 rows

  17. . . exported "SCOTT"."OBJ_PART":"P20171231" 8.394 MB   86566 rows   --注意此表表空間為USERS表空間

  18. . . exported "TEST"."TEST" 8.435 MB   87003 rows

  19. . . exported "TEST"."T_C" 3.035 MB   84748 rows

  20. . . exported "TEST"."T_ADV" 873.0 KB  100000 rows

  21. . . exported "TEST"."T_P" 83.70 KB    2870 rows

  22. . . exported "SCOTT"."OBJ_PART":"P20101231" 0 KB       0 rows

  23. . . exported "SCOTT"."OBJ_PART":"P20111231" 0 KB       0 rows

  24. . . exported "SCOTT"."OBJ_PART":"P20121231" 0 KB       0 rows

  25. . . exported "SCOTT"."OBJ_PART":"P20141231" 0 KB       0 rows

  26. . . exported "SCOTT"."OBJ_PART":"P20151231" 0 KB       0 rows

  27. . . exported "SCOTT"."OBJ_PART":"P20161231" 0 KB       0 rows

  28. Master table "SYS"."SYS_EXPORT_TABLESPACE_01" successfully loaded/unloaded

  29. ******************************************************************************

  30. Dump file set for SYS.SYS_EXPORT_TABLESPACE_01 is:

  31.   /backup/dump/exp_tablespace01.dmp

  32. Job "SYS"."SYS_EXPORT_TABLESPACE_01" successfully completed at Thu Aug 10 20:40:42 2017 elapsed 0 00:00:12


也就是使用expdp導出表空間時,并不是只導出該表空間所有數據,也會將相關聯的相關對象數據導出。

下面貼出官方解釋:

點擊(此處)折疊或打開

  1. TABLESPACES

  2. Default: There is no default


  3. Purpose


  4. Specifies a list of tablespace names to be exported in tablespace mode.


  5. Syntax and Description


  6. TABLESPACES=tablespace_name [, ...]

  7. In tablespace mode, only the tables contained in a specified set of tablespaces are unloaded. If a table is unloaded, then its dependent objects are also unloaded. Both object metadata and data are unloaded. If any part of a table resides in the specified set, then that table and all of its dependent objects are exported. Privileged users get all tables. Unprivileged users get only the tables in their own schemas



---大體意思
在表空間模式中, 只導出指定表空間中所包含的表。如果導出了表, 則它的從屬對象也將被導出。對象元數據和數據都將被導出。如果表的任何部分保存在在指定的表空間中, 則導出該表及其所有從屬對象。特權用戶獲取所有表,沒有特權的用戶只能在自己的權限內獲取表。


  1. Filtering can restrict what is exported using this mode (see "Filtering During Export Operations").


  2. Restrictions


  3. The length of the tablespace name list specified for the TABLESPACES parameter is limited to a maximum of 4 MB, unless you are using the NETWORK_LINK to an Oracle Database release 10.2.0.3 or earlier or to a read-only database. In such cases, the limit is 4 KB.


  4. Example


  5. The following is an example of using the TABLESPACES parameter. The example assumes that tablespaces tbs_4, tbs_5, and tbs_6 already exist.


  6. > expdp hr DIRECTORY=dpump_dir1 DUMPFILE=tbs.dmp

  7. TABLESPACES=tbs_4, tbs_5, tbs_6

  8. This results in a tablespace export in which tables (and their dependent objects) from the specified tablespaces (tbs_4, tbs_5, and tbs_6) will be unloaded.

感謝各位的閱讀!關于“expdp如何導出表空間”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

临泽县| 德江县| 南和县| 郓城县| 马鞍山市| 开封市| 彰化市| 遂昌县| 武隆县| 关岭| 墨脱县| 元谋县| 南江县| 惠东县| 灌阳县| 信丰县| 河间市| 岚皋县| 九江市| 河北省| 舞钢市| 清涧县| 东光县| 蚌埠市| 策勒县| 石景山区| 济源市| 托克逊县| 定远县| 色达县| 盐池县| 七台河市| 阳东县| 当雄县| 阿拉善右旗| 东辽县| 玉环县| 丰顺县| 万安县| 江源县| 区。|