[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
[20200309]expdp 与read only.txt
来源:这里教程网
时间:2026-03-03 15:16:37
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 数据库启动报错:ORA-01102: cannot mount database in EXCLUSIVE mode
- Oracle 19c RAC on Linux 7.6安装手册
Oracle 19c RAC on Linux 7.6安装手册
26-03-03 - 启动报错:ORA-00376:file x cannot be read at this time
- oracle ADG ora-30927
oracle ADG ora-30927
26-03-03 - Oracle面试宝典-表连接篇
Oracle面试宝典-表连接篇
26-03-03 - ocr voting disk 有备份和无备份的恢复
ocr voting disk 有备份和无备份的恢复
26-03-03 - 由OGG引发的数据库故障
由OGG引发的数据库故障
26-03-03 - Oracle cluster table(1)_概念介绍
Oracle cluster table(1)_概念介绍
26-03-03 - Oracle SQL处理
Oracle SQL处理
26-03-03 - psd 链接本地tnsnames
psd 链接本地tnsnames
26-03-03
