oracle新建表空間和使用者 匯入匯出資料庫檔案

2021-08-09 05:32:27 字數 1468 閱讀 5237

oracle資料庫可以建立多個例項,每個例項可以建立多個表空間,每個表空間下可以建立多個使用者(同時使用者也屬於表空間對應的例項)

orcl是oracle資料庫預設的例項,一般都是在這個例項下建立表空間、使用者。

在dos下建立表空間和使用者:

首先輸入 sqlplus 提示輸入使用者名稱 再輸入sys/sys as sysdba 進入oracle系統使用者;

然後在sys使用者下新建表空間和使用者:

create tablespace test1   --建立test1表空間

datafile 'e:\test1.dbf' --物理檔名為test1.dbf

size 1500m --初始大小為1500m

autoextend on next 100m --自動擴充套件,每次擴充套件100m

授予使用者登入和全庫匯入許可權:

grant connect to test1;

grant imp_full_database to test1;

grant resource to test1;

grant dba to test1;
新建表、插入資料過程省略。。

匯出表:

exp test1/123456 file=d:\daochu.dmp
注意這句sql要退出sqlplus,直接在dos命令下執行,下面的匯入命令也是

匯入表:

至此,oracle sqlplus下建立表空間、建立使用者、匯入匯出資料檔案完成。

oracle新建表空間,新建使用者提示表空間不存在

之前遇到oracle12 在新建表空間之後 create tablespace logging datafile dbf size 100m autoextend on next 100m extent management local 第步新建角色使用表空間 create user identif...

oracle建立表空間和新建使用者

建立表空間 create tablespace zhdj datafile f installed devinstall oracle11 oradata orcl zhdj.dbf size 1024m autoextend on next 10m maxsize unlimited 建立臨時表空...

Oracle新建使用者和建立表空間

檢視表空間利用率 select a.tablespace name 表空間名 round total 1024 1024 1024,2 表空間大小 round free 1024 1024 1024,2 表空間剩餘大小 round total free 1024 1024 1024,2 表空間使用大...