網(wǎng)站首頁 編程語言 正文
數(shù)據(jù)導(dǎo)出:
1、將數(shù)據(jù)庫orcl完全導(dǎo)出,用戶名system 密碼manager 導(dǎo)出到D:\daochu.dmp中
exp system/manager@orcl file=d:\daochu.dmp full=y
2、將數(shù)據(jù)庫中system用戶與sys用戶的表導(dǎo)出
exp system/manager@orcl file=d:\daochu.dmp owner=(system,sys)
3、將數(shù)據(jù)庫中的表table1 、table2導(dǎo)出
exp system/manager@orcl file=d:\daochu.dmp tables=(table1,table2)
4、將數(shù)據(jù)庫中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導(dǎo)出
exp system/manager@orcl file=d:\daochu.dmp tables=(table1)query=\" where filed1 like '00%'\"
上面是常用的導(dǎo)出,對于壓縮我不太在意,用winzip把dmp文件可以很好的壓縮。
不過在上面命令后面 加上 compress=y
就可以了
數(shù)據(jù)導(dǎo)入:
1、將D:\daochu.dmp 中的數(shù)據(jù)導(dǎo)入 orcl數(shù)據(jù)庫中。
imp system/manager@orcl file=d:\daochu.dmp
上面可能有點問題,因為有的表已經(jīng)存在,然后它就報錯,對該表就不進(jìn)行導(dǎo)入。
在后面加上 ignore=y
就可以了。
2、將d:\daochu.dmp中的表table1 導(dǎo)入
imp system/manager@orcl file=d:\daochu.dmp tables=(table1)
基本上上面的導(dǎo)入導(dǎo)出夠用了。不少情況我是將表徹底刪除,然后導(dǎo)入。
注意:
你要有足夠的權(quán)限,權(quán)限不夠它會提示你。
數(shù)據(jù)庫時可以連上的。可以用tnsping orcl
來獲得數(shù)據(jù)庫orcl
能否連上
附錄:
給用戶增加導(dǎo)入數(shù)據(jù)權(quán)限的操作
- 第一,啟動sql*puls
- 第二,以system/manager登陸
- 第三,create user 用戶名 IDENTIFIED BY 密碼 (如果已經(jīng)創(chuàng)建過用戶,這步可以省略)
- 第四,
GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW , DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE, DBA,CONNECT,RESOURCE,CREATE SESSION TO 用戶名字
- 第五, 運行-cmd-進(jìn)入dmp文件所在的目錄,?
imp userid=system/manager full=y file=*.dmp
或者
imp userid=system/manager full=y file=filename.dmp
原文鏈接:https://blog.csdn.net/weixin_42290280/article/details/93725795
相關(guān)推薦
- 2022-07-24 python單向循環(huán)鏈表實例詳解_python
- 2023-01-03 C++定義和初始化string對象實例詳解_C 語言
- 2022-04-25 基于Matplotlib?調(diào)用?pyplot?模塊中?figure()?函數(shù)處理?figure圖形對
- 2022-08-29 如何用python將單引號替換為雙引號_python
- 2022-11-10 利用C++實現(xiàn)獲取文件夾下所有文件名_C 語言
- 2022-04-10 Blazor組件事件處理功能_基礎(chǔ)應(yīng)用
- 2022-03-31 QT實現(xiàn)單詞檢索軟件的示例代碼_C 語言
- 2022-11-05 關(guān)于Python?Tkinter?復(fù)選框?->Checkbutton_python
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支