oracle 資料匯入匯出命令

2021-08-31 17:52:42 字數 1233 閱讀 9795

--匯入匯出語句 cmd命令

exp userid=system/manager owner=username1 file=expfile.dmp

imp userid=system/manager fromuser=username1 touser=username2 ignore=y file=expfile.dmp

--查詢表空間儲存的檔案

select file_name,tablespace_name from dba_data_files where tablespace_name='system'

create tablespace wh datafile 'e:\oracle\product\10.2.0\oradata\orcl\wh01.dbf' size 500m;

--建立臨時表空間

create temporary tablespace gmap60_temp

tempfile 'f:\oracle\product\10.2.0\oradata\orcl\gmap60_temp.dbf' --表空間對應的檔案

size 32m

autoextend on

next 32m maxsize unlimited;

--建立表空間

create tablespace gmap60

logging

datafile 'f:\oracle\product\10.2.0\oradata\orcl\gmap60.dbf'

size 32m

autoextend on

next 32m maxsize unlimited;

--建立使用者

create user gmap60 identified by "1"

default tablespace gmap60

temporary tablespace gmap60_temp;

--給使用者分配許可權

grant connect,dba,resource to gmap60;

--刪除表空間

drop tablespace yn_data including contents and datafiles

--修改密碼

alter user ***x identified by

倒庫的時候,有可能是不同人或者不同表空間約束的表不成功匯入,

這種情況下匯入表的,最好表空間和使用者名稱採取一致,這樣不容易出錯

Oracle資料匯入匯出imp exp命令

file d daochu.dmp full y 2 將資料庫中system使用者與sys使用者的表匯出 exp system manager test file d daochu.dmp owner system,sys 3 將資料庫中的表inner notify notify staff rel...

Oracle資料匯入匯出imp exp命令

oracle資料庫 基本操作 一 資料匯出 將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d daochu.dmp中 exp system manager test file d daochu.dmp full y 將資料庫中system使用者與sys使用者的表匯出 e...

Oracle資料匯入匯出imp exp命令

oracle資料匯入匯出imp exp就相當於oracle資料還原與備份。exp命令可以把資料從遠端資料庫伺服器匯出到本地的dmp檔案,imp命令可以把dmp檔案從本地匯入到遠處的資料庫伺服器中。執行環境 可以在sqlplus.exe或者dos 命令列 中執行,dos中可以執行時由於 在oracle...