[20200309]expdp 與read only.txt
[20200309]expdp 與read only.txt
--//連結:http://www.itpub.net/thread-2128382-1-1.html問的問題。
--//請教各位大佬,在dataguard的read only模式下,不做轉換,如何使用expdp匯出資料?
--//在本地read only的情況下,不能使用expdp匯出資料的。。
1.環境:
SYS@bookdg> select open_mode from v$database ;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
$ expdp scott/book tables=T
Export: Release 11.2.0.4.0 - Production on Mon Mar 9 10:09:15 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31633: unable to create master table "SCOTT.SYS_EXPORT_TABLE_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 1038
ORA-16000: database open for read-only access
--//無法建立master table SCOTT.SYS_EXPORT_TABLE_05.
2.可以找一臺讀寫的機器,透過dblink實現到處,甚至匯入。
CREATE PUBLIC DATABASE LINK TEST040
CONNECT TO SCOTT
IDENTIFIED BY book
USING 'bookdg';
SYS@book> select sysdate from dual@test040;
SYSDATE
-------------------
2020-03-09 10:14:23
SYS@book> alter system set log_archive_dest_state_2=defer scope=memory;
System altered.
SYS@book> alter system archive log current ;
System altered.
SCOTT@book> insert into t select * from t where rownum=1;
1 row created.
SCOTT@book> commit ;
Commit complete.
SCOTT@book> select count(*) from t;
COUNT(*)
----------
85034
$ expdp scott/book NETWORK_LINK=test040 tables=T DUMPFILE=t.dmp
Export: Release 11.2.0.4.0 - Production on Mon Mar 9 10:21:10 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SCOTT"."SYS_EXPORT_TABLE_01": scott/a*** NETWORK_LINK=test040 tables=T DUMPFILE=t.dmp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 10 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "SCOTT"."T" 8.244 MB 85033 rows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--//我在主庫匯出,你可以發現我停止日誌應用,備庫少1條記錄。
Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/admin/book/dpdump/t.dmp
Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at Mon Mar 9 10:21:16 2020 elapsed 0 00:00:05
--//OK,匯出成功。
3.你還可以直接匯入:
$ impdp scott/book NETWORK_LINK=test040 tables=T REMAP_TABLE=scott.T:scott.T1
Import: Release 11.2.0.4.0 - Production on Mon Mar 9 10:24:12 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SCOTT"."SYS_IMPORT_TABLE_01": scott/a* NETWORK_LINK=test040 tables=T REMAP_TABLE=scott.T:scott.T1
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 10 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . imported "SCOTT"."SCOTT.T1" 85033 rows
Job "SCOTT"."SYS_IMPORT_TABLE_01" successfully completed at Mon Mar 9 10:24:18 2020 elapsed 0 00:00:06
--//昏,語法有問題,不過還是匯入成功了。不需要在後面schema。
SYS@book> select count(*) from scott."SCOTT.T1";
COUNT(*)
----------
85033
SYS@book> select count(*) from SCOTT.T;
COUNT(*)
----------
85034
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2679129/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20180628]expdp與rows=n.txt
- [20181011]12c set FEEDBACK only.txt
- SRAM的Write Assist與Read Assist
- db block gets 與 consistent read getsBloC
- mysql snapshot read快照讀及current read當前讀與鎖lock之一MySql
- mysql中read commited與repeatable read兩種隔離級別的測試MySqlMIT
- [20180905]lob與direct path read.txt
- expdp query用法
- [20200309]rlwrap: error: Cannot execute sqlplus: Too many levels of symbolic linErrorSQLSymbol
- [20181105]再論12c set feedback only.txt
- while read line 與for迴圈的區別While
- direct path read/read temp等待事件事件
- expdp一個例子
- READ ME
- Read a story
- 等待事件db file sequential read、db file scattered read和direct read的區別事件
- [20200309]資料庫異常關閉恢復的終點.txt資料庫
- [Bash] read command
- TIC Read Status
- Read-onlydynamicdata
- 正常終止expdp作業
- expdp報錯ORA-39181
- 批量按使用者expdp
- expdp+compression效能測試
- requests庫中r.content 與 r.read() 的使用方式
- MySQL的repeatable readMySql
- Preferred Read Failure GroupsAI
- 使用Exp和Expdp匯出資料的效能對比與最佳化
- [LeetCode] 158. Read N Characters Given Read4 II – Call multipleLeetCode
- expdp/impdp變慢 (Doc ID 2469587.1)
- [20200620]expdp impdp exclude引數.txt
- expdp 匯出時指定節點
- 【Data Pump】expdp/impdp Job基本管理
- oracle資料庫的impdp,expdpOracle資料庫
- expdp 邏輯備份指令碼指令碼
- MySQL 8.0 Reference Manual(讀書筆記66節--locking read 與lock)MySql筆記
- [Javascript] How javascript read the property?JavaScript
- Spark Streaming Failed to read checSparkAI