中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

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

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

如何解析data punp傳輸表空間

發布時間:2021-11-12 14:07:00 來源:億速云 閱讀:123 作者:柒染 欄目:關系型數據庫

這篇文章將為大家詳細講解有關如何解析data punp傳輸表空間,文章內容質量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。

1,查看待傳輸表空間example是否違反了獨立性規則

[oracle@snow ~]$ export ORACLE_SID=ora12c

[oracle@snow ~]$ sqlplus / as sysdba

SYS@ora12c >exec dbms_tts.transport_set_check('EXAMPLE',TRUE);

PL/SQL procedure successfully completed.

SYS@ora12c >select * from transport_set_violations;

no rows selected

2,將表空間example置為只讀

SYS@ora12c >alter tablespace example read only;

Tablespace altered.

源端數據文件路徑

SYS@ora12c >select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/ora12c/system01.dbf

/u01/app/oracle/oradata/ora12c/example01.dbf

/u01/app/oracle/oradata/ora12c/sysaux01.dbf

/u01/app/oracle/oradata/ora12c/undotbs01.dbf

/u01/app/oracle/oradata/ora12c/users01.dbf

目標端數據文件路徑

SYS@OCM12C >select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/12c/app/oracle/oradata/OCM12C/datafile/o1_mf_system_8xf29zsz_.dbf

/12c/app/oracle/oradata/OCM12C/datafile/o1_mf_sysaux_8xf1zgd7_.dbf

/12c/app/oracle/oradata/OCM12C/datafile/o1_mf_undotbs1_8xf2pgsg_.dbf

/12c/app/oracle/oradata/OCM12C/datafile/o1_mf_users_8xf2p505_.dbf

3,將源端的表空間數據文件scp到目標端數據文件路徑

SYS@ora12c >!scp /u01/app/oracle/oradata/ora12c/example01.dbf 172.16.228.9:/12c/app/oracle/oradata/OCM12C/datafile/example01.dbf

oracle@172.16.228.9's password:

example01.dbf 100% 323MB 32.3MB/s 00:10

SYS@ora12c >exit

4,使用數據泵導出表空間example的元數據scp到目標端的數據泵目錄(和源端一樣也是設置為dp_dir=/home/oracle)

[oracle@snow ~]$ expdp dp/dp directory=dp_dir dumpfile=trans.dmp transport_tablespaces=example

Export: Release 12.1.0.1.0 - Production on Mon Feb 9 12:45:28 2015

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Starting "DP"."SYS_EXPORT_TRANSPORTABLE_01": dp/******** directory=dp_dir dumpfile=trans.dmp transport_tablespaces=example

Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC

Processing object type TRANSPORTABLE_EXPORT/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT

Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_BODY

Processing object type TRANSPORTABLE_EXPORT/PROCACT_INSTANCE

Processing object type TRANSPORTABLE_EXPORT/XMLSCHEMA/XMLSCHEMA

Processing object type TRANSPORTABLE_EXPORT/TABLE

Processing object type TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT

Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX

Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX

Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT

Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/COMMENT

Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT

Processing object type TRANSPORTABLE_EXPORT/INDEX/BITMAP_INDEX/INDEX

Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/TRIGGER

Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS

Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER

Processing object type TRANSPORTABLE_EXPORT/DOMAIN_INDEX/INDEX

Processing object type TRANSPORTABLE_EXPORT/MATERIALIZED_VIEW

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCACT_INSTANCE

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCDEPOBJ

Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK

Master table "DP"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for DP.SYS_EXPORT_TRANSPORTABLE_01 is:

/home/oracle/trans.dmp

******************************************************************************

Datafiles required for transportable tablespace EXAMPLE:

/u01/app/oracle/oradata/ora12c/example01.dbf

Job "DP"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at Mon Feb 9 12:46:34 2015 elapsed 0 00:01:04

[oracle@snow ~]$ scp trans.dmp 172.16.228.9:/home/oracle

The authenticity of host '172.16.228.9 (172.16.228.9)' can't be established.

RSA key fingerprint is 70:7d:ec:8f:42:44:21:c9:24:d3:fc:23:1e:20:4b:ec.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '172.16.228.9' (RSA) to the list of known hosts.

oracle@172.16.228.9's password:

trans.dmp 100% 3172KB 3.1MB/s 00:00

6,將元數據導入目標端數據庫

[oracle@test ~]$ impdp hr/hr directory=dp_dir dumpfile=trans.dmp transport_datafiles=/12c/app/oracle/oradata/OCM12C/datafile/example01.dbf

Import: Release 12.1.0.1.0 - Production on Wed Feb 25 18:01:16 2015

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Master table "HR"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded

Starting "HR"."SYS_IMPORT_TRANSPORTABLE_01": hr/******** directory=dp_dir dumpfile=trans.dmp transport_datafiles=/12c/app/oracle/oradata/OCM12C/datafile/example01.dbf

Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

ORA-39123: Data Pump transportable tablespace job aborted

ORA-29342: user PM does not exist in the database

Job "HR"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fata

錯誤提示沒有PM用戶,創建該用戶后重新執行impdp陸續提示SH,oe,ix用戶不存在,逐個創建上述用戶。

SYS@OCM12C >create user pm identified by pm;

SYS@OCM12C >create user sh identified by sh;

SYS@OCM12C >create user oe identified by oe;

SYS@OCM12C >create user ix identified by ix;

添加用戶后再次執行impdp成功

7,分別將源端和目標端端將表空間修改為read write狀態

SYS@OCM12C >alter tablespace example read write;

Tablespace altered.

SYS@OCM12C >select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME STATUS

------------------------------ ---------

SYSTEM ONLINE

SYSAUX ONLINE

UNDOTBS1 ONLINE

TEMP ONLINE

USERS ONLINE

EXAMPLE ONLINE

SYS@ora12c >alter tablespace example read write;

Tablespace altered.

SYS@ora12c >select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME STATUS

------------------------------ ---------

SYSTEM ONLINE

SYSAUX ONLINE

UNDOTBS1 ONLINE

TEMP ONLINE

USERS ONLINE

EXAMPLE ONLINE

關于如何解析data punp傳輸表空間就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細節

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

AI

嘉义市| 平谷区| 曲麻莱县| 阳泉市| 白水县| 临西县| 和平区| 赣州市| 罗平县| 平南县| 鄱阳县| 大新县| 肥西县| 邳州市| 甘洛县| 晋中市| 电白县| 蕲春县| 饶河县| 井研县| 府谷县| 吉安市| 肇庆市| 冕宁县| 华阴市| 东乡族自治县| 江山市| 唐山市| 珲春市| 图们市| 芒康县| 陇南市| 大方县| 登封市| 阿拉善右旗| 会昌县| 泉州市| 三都| 太保市| 博罗县| 安义县|