Oracle 备份还原

 

 

 

--创建用户
create user archgh236
identified by archgh236
default tablespace users
temporary tablespace temp;


--权限
grant dba,resource,unlimited tablespace,connect to archgh;

 

exp yonghuming/mima@fuwuming file=c:\a.dmp owner=(suoyouzhe) 导出
imp archgh/archgh@orcl file=d:\data\a.dmp full=y ignore=y 导入


imp archgh236/archgh236@12 file=L:\20130625.dmp formuser=archgh235 touser=archgh236 不同用户 导入

 

备注:

还原备份: 如果在线运行的库,需要还原为以前备份的版本,需要几步操作

1.删除数据库中所有的表

    URL: http://www.cnblogs.com/manglu/p/4572739.html

select 'drop table '||table_name||';' 
from cat 
where table_type='TABLE'

将会输出一批删除表的sql语句,这些SQL语句执行一下就可以了。(需要有drop table的权限)

2.数据库导入操作

  imp archgh/archgh@orcl file=d:\data\a.dmp full=y ignore=y 导入

 

posted on 2015-03-16 08:49  忙碌ing  阅读(155)  评论(0)    收藏  举报

导航