RAC建立DBlink並使用impdp抽取源庫資料
轉載於-->>
賦權並建立dblink
賦權並建立dblink
[oracle@zhongwc1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 10:26:45 2013
Copyright (c) 1982, 2011, . All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> grant create database link to zwc;
Grant succeeded.
SQL> conn zwc/
Enter password:
Connected.
SQL> show user
USER is "ZWC"
SQL> select tname from tab;
no rows selected
create public database link ZWC
connect to zhongwc identified by zhongwc
using '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.201)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ZWC)
)
9 )';
Database link created.
SQL> select * from dual@zwc;
D
-
X
SQL> show user
USER is "ZWC"
SQL> select tname from tab;
no rows selected
SQL> select tname from tab@zwc;
TNAME
------------------------------
T_ZHONGWC
SQL> select count(*) from t_zhongwc;
select count(*) from t_zhongwc
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select count(*) from t_zhongwc@zwc;
COUNT(*)
----------
75453
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@zhongwc1 ~]$ impdp system/oracle network_link=zwc schemas=zhongwc remap_schema=zhongwc:zwc
Import: Release 11.2.0.3.0 - Production on Mon Feb 4 10:47:45 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** network_link=zwc schemas=zhongwc remap_schema=zhongwc:zwc
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 9 MB
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"ZWC" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . imported "ZWC"."T_ZHONGWC" 75453 rows
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at 10:48:32
驗證
[oracle@zhongwc1 ~]$ sqlplus zwc
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 10:50:09 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select count(*) from t_zhongwc@zwc;
COUNT(*)
----------
75453
SQL> select count(*) from t_zhongwc;
COUNT(*)
----------
75453
SQL> drop public database link zwc;
Database link dropped.
SQL> select count(*) from t_zhongwc@zwc;
select count(*) from t_zhongwc@zwc
*
ERROR at line 1:
ORA-02019: connection description for remote database not found
SQL> select count(*) from t_zhongwc;
COUNT(*)
----------
75453
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1120455/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用資料泵(expdp、impdp)遷移資料庫流程資料庫
- oracle資料庫的impdp,expdpOracle資料庫
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- mysql建立使用者並且對資料庫授權MySql資料庫
- 建立dblink
- 使用免費的Oracle雲服務-建立並使用ADW資料庫Oracle資料庫
- oracle dblink用法總結和expdp和impdp利用dblink倒入匯出到本地Oracle
- 配置達夢資料庫同構DBLINK資料庫
- 資料抽取平臺pydatax使用案例---11個庫專案使用
- mogoose 建立資料庫並增刪改查Go資料庫
- 配置ORACLE資料庫到達夢資料庫的異構DBLINKOracle資料庫
- 如何使用 abp 建立 module 並應用單獨的資料庫遷移資料庫
- Oracle 11g用impdp還原資料庫Oracle資料庫
- 使用impdp,expdp資料泵進入海量資料遷移
- GoldenGate抽取Informix資料庫安裝及配置GoORM資料庫
- dblink建立語句模板
- 建立資料庫資料庫
- 2.3.1 有關使用DBCA建立資料庫資料庫
- 2.4.1 使用 CREATE DATABASE 子句建立資料庫Database資料庫
- 4.2.11 使用 SRVCTL 建立資料庫服務資料庫
- Oracle 19.3資料庫impdp匯入view時hang住Oracle資料庫View
- 從cmd中匯入.SQL檔案並建立資料庫SQL資料庫
- DM7使用DMRMAN執行RAC資料庫恢復資料庫
- oracle rac資料庫的安裝Oracle資料庫
- RAC開啟資料庫歸檔資料庫
- vgant 安裝oracle資料庫racOracle資料庫
- RAC資料庫心跳更換方案資料庫
- Redis全文搜尋教程之建立索引並關聯源資料Redis索引
- RestCloud ETL抽取動態庫表資料實踐RESTCloud
- [20210201]dblink建立連線串使用ENABLE=BROKEN.txt
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- 19c資料庫impdp匯入view時hang住資料庫View
- Oracle 28.6資料庫impdp匯入view時hang@11Oracle資料庫View
- 2.4 使用 CREATE DATABASE 語句建立資料庫Database資料庫
- DM7 使用dminit工具建立資料庫資料庫
- oracle資料庫使用者建立步驟Oracle資料庫
- MacOS使用Docker建立MySQL主主資料庫MacDockerMySql資料庫
- MacOS使用Docker建立MySQL主從資料庫MacDockerMySql資料庫
- SQL Server建立dblink至MySQLServerMySql