当前位置:  数据库>oracle

利用DB_LINK在不同平台的数据库中复制数据

    来源: 互联网  发布时间:2017-04-25

    本文导语: [Oracle@Template-RedHat54 admin]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 13-APR-2012 23:09:14 Copyright (c) 1991, 2009, Oracle.  All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> statusConnecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STA...

[Oracle@Template-RedHat54 admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 13-APR-2012 23:09:14

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                13-APR-2012 19:23:20
Uptime                    0 days 3 hr. 45 min. 56 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
# tnsnames.ora Network Configuration File: /oracle/product/11.2.0/dbhome_1/netwo
rk/admin/tnsnames.ora
# Generated by Oracle configuration tools.












ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Template-Redhat54)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )
WIN =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WINDOWS)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )














~
~
"tnsnames.ora" 20L, 503C written
[oracle@Template-Redhat54 admin]$ tnsping WIN


TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 13-APR-2012 23:10
:13

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = WINDOWS)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))
OK (10 msec)
[oracle@Template-Redhat54 admin]$ sqlplus / as sysdba



SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 13 23:10:18 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options



SQL> create database link WIN connect to system identified by system using "WIN";
create database link WIN connect to system identified by system using "WIN"
                                                                      *
ERROR at line 1:
ORA-02010: missing host connect string




SQL>  create database link WIN connect to system identified by system using 'WIN';

Database link created.

SQL> select * from dual@WIN;

D
-
X

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@Template-Redhat54 admin]$ sqlplus / as sysdba



SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 13 23:14:00 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options



SQL>  create public database link WIN connect to system identified by system using "WIN";
 create public database link WIN connect to system identified by system using "WIN"
                                                                              *
ERROR at line 1:
ORA-02010: missing host connect string




SQL>   create public database link WIN connect to system identified by system using 'WIN';

Database link created.

SQL> select * from dual@WIN;

D
-
X

SQL> drop database link WIN;

Database link dropped.

SQL>  select * from dual@WIN;


D
-
X


SQL> SQL> exit5
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@Template-Redhat54 admin]$ impdp system/system network_link=WIN schemas=datarepository



Import: Release 11.2.0.1.0 - Production on Fri Apr 13 23:15:38 2012

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/******** network_link=WIN schemas=datarepository
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 384 KB
Processing object type SCHEMA_EXPORT/USER
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/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . imported "DATAREPOSITORY"."CONNECTIONSTRING"              8 rows
. . imported "DATAREPOSITORY"."IBS_DB_VERSION"               23 rows
. . imported "DATAREPOSITORY"."SMP_SYS_CNFG"                557 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
ORA-39082: Object type PACKAGE_BODY:"DATAREPOSITORY"."PKG_DDL" created with compilation warnings
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 1 error(s) at 23:17:05



























更多Oracle相关信息见 专题页面


    
 
 

您可能感兴趣的文章:

  • 如何利用libpcap和Python嗅探数据包
  • 怎样利用JAVABEAN将JSP页面提交的数据保存到数据库,请给代码好吗?谢谢!
  • CPU、内存、数据库利用率监控
  • Oracle利用存储过程造数据
  • 利用多个转储文件导出大量Oracle数据
  • 如何利用Applet访问数据库?
  • 哪位有java通信方面的经验,谈谈如何利用java编写服务器程序来接受unix主机发送的数据信息?
  • 利用Java 技术,怎样把JSP页面中的表格数据导入到microsoft Excel中
  • mysql利用group_concat()合并多行数据到一行
  • 利用JDBC-ODBC能不能向数据库中存储二进制数据
  • JS、replace利用正则表达式替换SQL所有参数为指定格式的数据
  • 急急急!!利用jdbc-odbc bridge 连接远程数据库
  • 怎样利用html中的超链接来执行一个servlet或者提交该页面上的数据给一个JSP
  • html下利用javascript连数据库
  • 怎样利用JDBC连接oracle数据库?谢谢!!!
  • 大家好,我有一586 32m内存的计算机希望能够利用,不必图形界面但需要通过局域网上Internet接收数据,能够安全稳定占用较少的资源。
  • 利用ASP来实现Oracle数据记录的分页显示
  • 嵌入式中,利用C语言操作SQLite数据库,查询没有数据返回,请大家帮忙看看哈
  • 利用可更新ResultSet的updateBinaryStream()可以把图片存到mySql数据库,却不能存到Oracle数据库,怎么办?
  • 利用shell删除数据表中指定信息和字段对应的文件
  • 利用JDBC连接mysql数据库,运行环境为IBM的aglets平台。碰到如下问题!!!SOS!!
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • linux c下利用srand和rand函数生成随机字符串
  • 请问:Linux下用C编程计算CPU利用率和内存利用率?
  • linux下利用(cat,strings,head,sed)命令生成随机字符串
  • 在2003下利用vmware安装了linux,又利用host-only方式上了网,问题如下多谢指点!!!
  • Web前端开发如何利用css样式来控制Html中的h1/h2/h3标签不换行
  • 大虾 紧急求助!!!!如何求得当前机子的处理器利用率和内存利用率?
  • windows堆栈溢出利用的七种方式
  • 如何利用Bash脚本(利用awksedgrepwc等)来自动修改配置文件
  • 求RADIUS的动态分配IP的问题(利用IPPOOL)
  • iowait和cpu利用率的权衡问题
  • Utility iis7站长之家
  • Qt中利用槽如何来传递参数
  • 浏览器漏洞利用框架 BeEF
  • 怎么样利用Socket进行Java网络编程
  • 请问如何编程获得CPU利用率?(空)
  • 如何利用Linux安装盘制作启动盘?
  • 谁知道linux/unix下利用Schema读取校验xml的开源代码,给一个链接,谢谢!
  • 怎样实现利用fprintf,输出定长字串,位数不足时在左侧填入指定字符填充。。
  • 怎样利用u-boot烧写??
  • 根目录 / 文件利用过高, 啥办法?
  • Linux下利用MC35实现GPRS上网的问题


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,