Data backup and restore oracle

A table of data backup and restore

creat table backup table select * from table where the original

insert into the original table select * from backup table  

 

Second, using the backup table to restore the original field data table section

update 原表 t
set (age, idnumber) =
  (select age, idnumber from 备份表 b where b.stuid = t.stuid)
     where exists

        (SELECT. 1  from the backup table b

           where b.stuid = t.stuid
              and b.stuname = '张三');

Three, , exp Export command ( run cmd )

1, export database

exp username / password @orcl file = d: \ daochu.dmp full = y

2, export table space 

exp username / password @orcl File = d: \ daochu .dmp the Tablespaces = (testspace)


3.
Export User

exp username / password @orcl File = D: \ daochu .dmp owner = (System, SYS)

4. Export Table

exp username / password @orcl File = d: \ daochu .dmp the Tables = table1, table2   

 

Remark: buffer = 4096 (the size of the data buffer area designated) log = d: \ student.log (log storage path specified), for example:

 

Four, imp import command (run under cmd)

 imp username / password @orcl file = d: /daochu.dmp full = y ignore = y 

Note: sys user before importing data required to create a normal user, and create a new table space, empowerment.

 

 

Guess you like

Origin www.cnblogs.com/diandixingyun/p/11589960.html