oracle备份/恢复命令

#备份:
exp userid=Tiger/Tiger@orcl file=c:\BackupDB.dmp
exp userid=Tiger/Tiger@127.0.0.1:1521/orcl file=c:\BackupDB.dmp
#恢复:
imp userid=Tiger/Tiger@setupdb ignore=y full=y file=c:\BackupDB.dmp
 
#连接数据库安装用户
cmd → sqlplus → conn /as sysdba → 密码为空
 
#解锁用户
alter user scott account lock
alter user scott account unlock
alter user scott identified by tiger
 
#以dba身份登录
conn sys/sys as sysdba
 
#删除用户
drop user xxx cascade
 
#删除表空间
drop tablespace tablespace_name including contents and datafiles

 

posted @ 2018-01-11 14:15  没有听见下雨的声音  阅读(241)  评论(0编辑  收藏  举报