• expdp远程导出数据


    环境:
    源:
    os:windows
    db:11.2.0.1
    ip:192.168.213.129
    sid:orcl
    远程机导出:
    os:centos 6.5 x64
    db:11.2.0.4
    ip:192.168.213.199
    sid:netdata
     
    在213.199 上导出213.129schema为test的用户数据
     
    213.199操作:
    tnames.ora增加
    orcl =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.129)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
     
    创建dblink
    SQL>  create public database link netlink connect to test identified by test using 'orcl';

    Database link created.

    SQL> select * from test.db@netlink;

         ID NAME
    ---------- --------------------
         1 ss
         2 dd
     
    SQL> create or replace directory dumpdir as '/oradata/dump';

    Directory created.
     
    SQL> grant read,write on directory dumpdir to hr;

    Grant succeeded.

    SQL> conn hr/hr
    Connected.
    SQL> select * from test.db@netlink;

         ID NAME
    ---------- --------------------
         1 ss
         2 dd
         1 dddd

    SQL> quit
     
     
    [oracle@ORA11G-DG1 ~]$ expdp hr/hr  network_link=netlink directory=dumpdir dumpfile=test`date +%F`.dmp logfile=test`date +%F`.log schemas=test

    Export: Release 11.2.0.4.0 - Production on Wed Dec 10 07:50:25 2014

    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-31631: privileges are required
    ORA-39109: Unprivileged users may not operate upon other users' schemas
     
    解决办法
    SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 10 07:52:01 2014

    Copyright (c) 1982, 2013, Oracle.  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

    SQL> grant exp_full_database  to hr;

    Grant succeeded.

    SQL> quit
     
    Export: Release 11.2.0.4.0 - Production on Wed Dec 10 07:46:57 2014

    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-31631: privileges are required
    ORA-39149: cannot link privileged user to non-privileged user
     
    解决办法
    在213.129上
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    SQL> grant exp_full_database to test;

    授权成功。
  • 相关阅读:
    leetcode链表--15、reverse-nodes-in-k-group(按照k值进行k个结点的逆序)
    4、消除重复元素--网易2017春招
    24、剑指offer--二叉树中和为某一值的路径
    leetcode链表--14、add-two-numbers(两链表相加 得到新链表)
    3、调整队形--网易2017春招
    2、赶去公司--网易2017春招
    1、双核处理--网易2017春招
    CSS3自定义滚动条样式 -webkit-scrollbar
    git安装使用
    div+css居中
  • 原文地址:https://www.cnblogs.com/shawnloong/p/4155351.html
Copyright © 2020-2023  润新知