新建使用者及表空間

2021-05-14 09:17:41 字數 802 閱讀 9239

--新建表空間 corebank

create tablespace corebank

logging

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

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

--刪除表空間

drop tablespace corebank including contents and datafiles

--建立臨時表空間

create temporary tablespace test_temp

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

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

--建立使用者並分配表空間

create user _name identified by _password

default tablespace corebank

temporary tablespace test_temp;

--授權

grant   resource   to  _name

--檢視資料庫中所有表空間

select * from dba_tablespaces

oracle新建表空間及使用者

1.以管理員許可權開啟命令控制台,輸入下面命令 sqlplus sys 管理員賬戶名稱 就是dba賬戶 as sysdba 記得分號哦,有時沒有的話會報錯 2.先刪除要建立的角色 無論該角色存在與否,都最好執行一下這個命令 drop user 使用者名稱 cascade 3.建立使用者,並設定密碼 ...

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

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

Oracle新建表空間及使用者命令

我們部署乙個專案的開發環境的時候,往往要為該專案建乙個資料庫。一般在oracle是分配使用者及表空間,可以用下面語句快速的建立使用者及表空間 sqlplus nolog connect system admin orcl as sysdba drop tablespace cls including...