Oracle建立一個資料表空間和使用者來測試

來源:互聯網
上載者:User

Oracle建立一個資料表空間和使用者來測試

首先對Oracle資料表空間作如下說明

暫存資料表空間:是在做大資料量排序時,分組操作時用的,正常這些都是在記憶體中完成的,但在大資料量排序處理時,記憶體不夠用的情況下就會用到暫存資料表空間,這裡是不存放表的,有點類似於作業系統中的虛擬記憶體概念。

資料資料表空間:是存放表、索引等資料檔案的資料表空間,順帶說下最好把表和索引分在不同的資料表空間中,這樣效能會好很多。

使用者指定資料表空間:其實只是對使用者建表時候的資料表空間設定一個預設值,就是說這個user在建表時如果不指定資料表空間,就預設儲存在使用者指定的資料表空間下,但如果指定資料表空間,還是可以使用其他資料表空間的。而且如果其他使用者被授予許可權依然可以使用這個資料表空間。

作為一般使用者我們就建立一個資料資料表空間再分配給一個使用者就可以了

--建立使用者

 create user eh identified by "123";

--授予許可權

grant connect,resource to eh;

--建立資料表空間

create tablespace eh_temp_tablespace

datafile 'd:/oracle_tablespace/eh_temp_tablespace.dbf'

size 800m

autoextend on next 5m

maxsize 3000m

--授予使用者使用資料表空間的許可權

alter user eh quota unlimited on eh_temp_tablespace

或者 alter user eh quota *M on eh_temp_tablespace

--刪除資料表空間

drop tablespace eh_temp_tablespace including contents and datafiles

Oracle 11g資料表空間dbf檔案遷移

移動Oracle資料表空間資料檔案方案

刪除暫存資料表空間ORA-25152錯誤

Oracle資料表空間增長異常解決又一例

Oracle資料表空間Offline的三種參數詳述

Oracle 11g下加密資料表空間的使用

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.