Oracle笔记:备份还原
生活随笔
收集整理的這篇文章主要介紹了
Oracle笔记:备份还原
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
--------------備份還原--------------------
--物理備份
--邏輯備份
1)傳統(tǒng)工具: exp導(dǎo)出、imp導(dǎo)入
實質(zhì):調(diào)用sql指令,導(dǎo)入\導(dǎo)出數(shù)據(jù),速度較慢
可以運行在客戶端,也可以運行在服務(wù)器端,
在cmd窗口運行:
exp scott/tiger@vpmdb file=d:\xx.dmp
imp scott/tiger@vpmdb file=d:\xx.dmp exp scott/tiger@vpmdb file=d:\xx.dmp tables=emp,dept
imp scott/tiger@vpmdb file=d:\xx.dmp tables=emp,dept2)數(shù)據(jù)泵工具dump: expdp導(dǎo)出、impdp導(dǎo)入
實質(zhì):調(diào)用dbms_datameta包里面的過程,直接提取數(shù)據(jù)塊速度較快
只能在服務(wù)器端使用
使用流程:
1、準(zhǔn)備文件夾,即在磁盤上新建一個目錄。
2、新建oracle目錄
create directory ora_bak as 'd:\bak';
3、給用戶授權(quán),可以讀寫ora_bak的權(quán)限
grant read,write on directory ora_bak to scott;
4、導(dǎo)出數(shù)據(jù)
drop table scott.emp;
drop table scott.dept;
select * from scott.emp;
在cmd窗口運行:
expdp scott/tiger@vpmdb directory=bakdir dumpfile=xx.dmp
impdp scott/tiger@vpmdb directory=bakdir dumpfile=xx.dmp
expdp scott/tiger@vpmdb directory=bakdir dumpfile=xx1.dmp tables=(emp,dept)
expdp scott/tiger@vpmdb directory=bakdir dumpfile=xx1.dmp tables=%emp%
總結(jié)
以上是生活随笔為你收集整理的Oracle笔记:备份还原的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle plsql 月历
- 下一篇: 安卓连接真机调试