Home Database Mysql Tutorial Oracle利用外部表实现数据的迁移

Oracle利用外部表实现数据的迁移

Jun 07, 2016 pm 03:51 PM
oracle use external accomplish data migrate

利用外部表实现数据的迁移 数据移动例子 使用oracle_datapump创建外部表来迁移数据 1.在源数据库中创建目录; create directory dir_dump as '/home/oracle'; grant read,write on directory dir_dump to public; 2.创建外部表并卸载数据; create table tes

利用外部表实现数据的迁移

数据移动例子

使用oracle_datapump创建外部表来迁移数据

1.在源数据库中创建目录;
    create directory dir_dump as '/home/oracle';

    grant read,write on directory dir_dump to public;

2.创建外部表并卸载数据;
  create table test_t5 organization external
       (type oracle_datapump
        default directory dir_dump
        location ('t5_part1.dat','t5_part2.dat'))
        parallel 2
        as select ower,table_name,tablespace_name from dba_tables;

--define  _editor=vi
--ed  (设置vi,编辑)

select  count(*) from test_t5;
strings t5_part1.dat|more
   --检测数据

 

3.将上一步的数据文件,拷贝到远程的数据库目录;
   scp……  --远程拷贝 
   mkdir -p dat
   cp t5_p* dat/
   cd dat/

4.在目标数据库上使用我们拷贝过来的数据文件创建外部表;
   create directory dir_dump2 as '/home/oracle/dat';

   grant read,write on directory dir_dump2 to public;

  create tbale t_external(
    owner varchar2(100),
    table_name varchar2(100),
    tablespace_name varchar2(100))
  organization external(
    type oracle_datapump
    default directory dir_dump2
    loaction ('t5_part1.dat','t5_part2.dat'));

    select count(*) from t_external;
      --查看外部表

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

How long will Oracle database logs be kept?

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The order of the oracle database startup steps is

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

How to see the number of occurrences of a certain character in Oracle

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

How much memory does oracle require?

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

How much memory is needed to use oracle database

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

Oracle scheduled tasks execute the creation step once a day

70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI 70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI Jun 13, 2024 pm 03:47 PM

70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI

See all articles