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)出時的用戶名):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)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
Oracle使用range分區(qū)并根據(jù)時間列自動創(chuàng)建分區(qū)
這篇文章主要介紹了Oracle使用range分區(qū)并根據(jù)時間列自動創(chuàng)建分區(qū),本文給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2023-04-04ORA-02298: 無法驗證 (約束)提示未找到父項關(guān)鍵字的解決辦法
這篇文章主要介紹了ORA-02298: 無法驗證 (約束)提示未找到父項關(guān)鍵字的解決辦法,本文介紹的非常詳細,具有參考借鑒價值,需要的朋友可以參考下2016-09-09