Oracle笔记:备份还原
生活随笔
收集整理的這篇文章主要介紹了
Oracle笔记:备份还原
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
--------------備份還原--------------------
--物理備份
--邏輯備份
1)傳統工具: exp導出、imp導入
實質:調用sql指令,導入\導出數據,速度較慢
可以運行在客戶端,也可以運行在服務器端,
在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)數據泵工具dump: expdp導出、impdp導入
實質:調用dbms_datameta包里面的過程,直接提取數據塊速度較快
只能在服務器端使用
使用流程:
1、準備文件夾,即在磁盤上新建一個目錄。
2、新建oracle目錄
create directory ora_bak as 'd:\bak';
3、給用戶授權,可以讀寫ora_bak的權限
grant read,write on directory ora_bak to scott;
4、導出數據
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%
總結
以上是生活随笔為你收集整理的Oracle笔记:备份还原的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oracle plsql 月历
- 下一篇: 安卓连接真机调试