Oracle利用外部表实现数据的迁移
Jun 07, 2016 pm 03:51 PM利用外部表实现数据的迁移 数据移动例子 使用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;
--查看外部表

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How long will Oracle database logs be kept?

The order of the oracle database startup steps is

Oracle database server hardware configuration requirements

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

How much memory is needed to use oracle database

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
