Oracle Backup single table three options

A backup program:

1. Backup

create table [Backup Name] as select * from [table];

2. Recovery

TRUNCATE Table org_group;

INSERT INTO org_group SELECT * from [Backup Name];

3. instructions

which apply to the same a database, you need to back up a particular table.

 

Backup Option II:

1. Backup

oracle user terminal performs:

exp [user name] / [password] tables = [Table I], [Table II] File = / Home / oracle / table.dmp

2. Recovery

oracle user terminal to perform:

imp [user name] / [password] grants = y commit = y full = y ignore = y file = / home / oracle / table.dmp

 

backup Option three:

1. backup

Log in sqlplus:

sqlplus / AS sysdba

create Directory:

the create Directory dpdata as '/ home / oracle / ';

after the directory is created, it can read and write permissions granted to a specific user:

grant the read, oN directory dpdata the write to [user name];

the Oracle user terminal to execute:

expdp [User Name] / [password] tables = [Table], [Table II] Directory = dpdata dumpfile = table.dmp job_name = cases_export

2. recovery

sign in sqlplus:

sqlplus / AS sysdba

create Directory:

the Create Directory dpdata AS '/ home / oracle / ';

after the directory is created, it can read and write permissions granted to a specific user:

grant the read, oN directory dpdata the write to [user name];

the Oracle user terminal to perform:

impdp [user name] / [password] directory = dpdata = = cases_export table.dmp job_name dumpfile

3. Description

query dba_directories View all Directory:

the SELECT * from dba_directories;

delete Directory:

drop Directory dpdata;

Guess you like

Origin www.cnblogs.com/kakaisgood/p/11388476.html