Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2737175
  • 博文数量: 423
  • 博客积分: 7770
  • 博客等级: 少将
  • 技术积分: 4766
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-09 11:58
个人简介

Oracle/DB2/Postgresql/Mysql/Hadoop/Greenplum/Postgres-xl/Mongodb

文章分类

全部博文(423)

文章存档

2019年(3)

2018年(6)

2017年(27)

2016年(23)

2015年(30)

2014年(16)

2013年(31)

2012年(73)

2011年(45)

2010年(14)

2009年(30)

2008年(30)

2007年(63)

2006年(32)

分类: Oracle

2012-07-13 23:20:40





                                             Oracle 11g远程导出数据库



下面演示下使用数据泵的NETWORK_LINKOEL6.0 ORACLE 11gR2数据库中STORAGE用户下的所有对象迁移到OEL5.7 ORACLE 11gR2数据库中STORAGE用户下。
1.
创建TNS字符串

FHACDB = 
  (DESCRIPTION = 
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.101)(PORT = 1523)) 
     ) 
  (CONNECT_DATA = 
             (SERVICE_NAME = fhacdb) 
      ) 
  )

2.创建DIRECTORY并授权

SQL> create directory imp as '/home/oracle'; Directory created. 

SQL> grant read,write on directory imp to storage; 

Grant succeeded.

3.创建DB_LINK

SQL> create public database link l_storage connect to storage identified by storage using 'fhacdb'; 

Database link created.

4.使用IMPDPNETWORK_LINK进行迁移操作

[oracle@fhacdb admin]$ impdp storage/storage directory=imp network_link=l_storage

Import: Release 11.2.0.2.0 - Production on Wed Feb 15 11:02:18 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 With the Partitioning, OLAP, Data Mining and Real Application Testing options ... . . 
导入了 "STORAGE"."T_DICTIONARY" 123371. . 
导入了 "STORAGE"."CHN_WEST_DATE" 198702. . 
导入了 "STORAGE"."T_FILE_INFO_RAW" 25176. .
导入了 "STORAGE"."T_FILE_INFO" 6657. . 
导入了 "STORAGE"."T_LOG_INFO" 6476. . 
导入了 "STORAGE"."T_BATCH_QUALITY" 4760

.........................................................

阅读(1208) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~