oracle建立表空間 使用者 資料庫匯入和匯出

2021-05-23 23:13:07 字數 1913 閱讀 7824

1, 建立臨時表空間xtny_gis_temp

create temporary tablespace xtny_gis_temp

tempfile 'd:/oracle/product/10.2.0/oradata/orcl/xtny_gis_temp.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

2, 建立資料表空間xtny_gis

create tablespace xtny_gis

logging

datafile 'd:/oracle/product/10.2.0/oradata/orcl/xtny_gis.dbf'

size 100m

autoextend on

next 32m maxsize 2048m

extent management local;

3, 建立使用者xtnygis 密碼ecenter 並指定表空間

create user xtnygis identified by ecenter

default tablespace xtny_gis temporary tablespace xtny_gis_temp;

4, 刪除使用者xtnygis以及使用者所有的物件

drop user xtnygis cascade;

5, 授予xtnygis使用者dba角色的所有許可權

grant dba to xtnygis;

//給使用者授予許可權

grant connect,resource to xtnygis;

grant imp_full_database to xtnygis;

grant resource to  xtnygis;

grant create session to xtnygis;

grant unlimited tablespace to xtnygis;

6.匯出資料庫

資料匯出:

1 將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d:/daochu.dmp中

exp xtnygis/ecenter@orcl file=d:/daochu.dmp full=y

2 將資料庫中system使用者與sys使用者的表匯出

exp xtnygis/ecenter@orcl file=d:/daochu.dmp owner=(system,sys)

3 將資料庫中的表inner_notify、notify_staff_relat匯出

exp xtnygis/ecenter@orcl file= d:/datanewsmgnt.dmp tables=(inner_notify,notify_staff_relat)

4 將資料庫中的表table1中的字段filed1以"00"打頭的資料匯出

exp xtnygis/ecenter@orcl file=d:/daochu.dmp tables=(table1) query=" where filed1 like '00%'"

7.匯入資料庫

imp xtnygis/ecenter@orcl full=y  file= c:/1.dmp ignore=y log=c:/img.log

8.匯入檔案加上時間戳標記

exp

xtnygis/ecenter@orcl

file=c:/xtnygis%date:~0,10%.dmp log=d:/xtnygis%date:~0,10%.log

建立部落格使用者資料表

資料庫名 boke 字符集 utf8 utf8 unicode 排序方式 utf8 general ci選中資料庫 右鍵選擇執行sql檔案 選擇要執行的sql檔案 點選開始 完成後關閉 斷開資料庫鏈結 重新進入資料庫f xampp php php.exe artisan make model mod...

刪除使用者 資料庫 及表空間

gps平台 建設 軟體開發 系統運維,找森大網路科技!來自森大科技官方部落格 始 執行 cmd,然後輸入sqlplus as sysdba 連上資料庫 2 刪除使用者 在dos視窗輸入drop user eqm cascade 要打分號 3 刪除tablespace 在dos視窗輸入drop tab...

oracle建立使用者 資料庫物件的過程

以前接觸oracle不多,根據現在的工作,總結了一下在oracle建立使用者 資料庫物件的過程 1 安裝 oracle 資料庫應用程式,建立 oracle 例項 2 使用管理員許可權的使用者登陸資料庫 3 指定oracle 資料檔案所在的目錄 4 建立表空間和臨時表控制項 指定表空間的屬性 表空間名...