CMD操作oracle數(shù)據(jù)導(dǎo)庫過程圖解
1.cmd窗口下,登陸管理員用戶:sqlplus sys/1 as sysdba
2.創(chuàng)建新用戶并為用戶授權(quán):
(1)創(chuàng)建用戶
---Create the user create user Helq3_Pro identified by "1" default tablespace MOF temporary tablespace TEMP profile DEFAULT;
?。?)為用戶授權(quán)
SQL> grant dba to helq3_cpbgt_20200714 with admin option; SQL> grant unlimited tablespace to helq3_cpbgt_20200714 with admin option; SQL> grant imp_full_database to helq3_cpbgt_20200714;
3.數(shù)據(jù)導(dǎo)入
?。?)imp導(dǎo)入:
imp userid=helq3_cpbgt_20200714/1@orcl file=E:\cpcz.dmp full=yignore=y
?。?)數(shù)據(jù)泵導(dǎo)入impdp
首先,創(chuàng)建,并為用戶授權(quán)此文件夾
數(shù)據(jù)泵導(dǎo)入:
impdp helq3_cpbgt_20200714/1 dumpfile=cpcz.dmp directory=expdp_dir remap_schema=helq3_cpbgt_20200714(導(dǎo)出時(shí)的用戶名):helq3_cpbgt_20200714
4.數(shù)據(jù)導(dǎo)出
?。?)exp導(dǎo)出:
exp helq3_cpbgt_20200714/1@orcl file=E:\cpcz.dmp log=cpcz.log
導(dǎo)出帶空表的數(shù)據(jù)庫->先做查詢,再正常導(dǎo)出:
select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
?。?)expdp 數(shù)據(jù)泵導(dǎo)出:
expdp helq3_cpbgt_20200714/1@orclschemas=helq3_cpbgt_20200714 dumpfile=cpcz.dmp directory=expdp_dir logfile=cpcz.log
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- oracle執(zhí)行cmd的實(shí)現(xiàn)方法
- Oracle數(shù)據(jù)庫常用命令整理(實(shí)用方法)
- Oracle利用errorstack追蹤tomcat報(bào)錯(cuò)ORA-00903 無效表名的問題
- Oracle按身份證號(hào)得到省市、性別、年齡的示例代碼
- Windows10安裝Oracle19c數(shù)據(jù)庫詳細(xì)記錄(圖文詳解)
- Shell腳本連接oracle數(shù)據(jù)庫的實(shí)現(xiàn)代碼
- Oracle數(shù)據(jù)庫服務(wù)器修改操作系統(tǒng)時(shí)間的注意事項(xiàng)詳解
- Linux一鍵部署oracle安裝環(huán)境腳本(推薦)
相關(guān)文章
Oracle使用range分區(qū)并根據(jù)時(shí)間列自動(dòng)創(chuàng)建分區(qū)
這篇文章主要介紹了Oracle使用range分區(qū)并根據(jù)時(shí)間列自動(dòng)創(chuàng)建分區(qū),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-04-04ORA-02298: 無法驗(yàn)證 (約束)提示未找到父項(xiàng)關(guān)鍵字的解決辦法
這篇文章主要介紹了ORA-02298: 無法驗(yàn)證 (約束)提示未找到父項(xiàng)關(guān)鍵字的解決辦法,本文介紹的非常詳細(xì),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-09-09