oracle創(chuàng)建表空間的語句寫法
作者:佚名
oracle數(shù)據(jù)庫中,應(yīng)該如何創(chuàng)建表空間和用戶呢?這是很多人都提到的問題。下文對oracle創(chuàng)建表空間的語句寫法作了詳盡的闡述,供您參考。
oracle創(chuàng)建表空間是我們經(jīng)常會用到的操作,下面就為您詳細(xì)介紹oracle創(chuàng)建表空間的語句寫法,希望對您學(xué)習(xí)oracle創(chuàng)建表空間能有所幫助。
//創(chuàng)建臨時表空間
- create temporary tablespace test_temp
- tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf'
- size 32m
- autoextend on
- next 32m maxsize 2048m
- extent management local;
//創(chuàng)建數(shù)據(jù)表空間
- create tablespace test_data
- logging
- datafile 'E:\oracle\product\10.2.0\oradata\testserver\test_data01.dbf'
- size 32m
- autoextend on
- next 32m maxsize 2048m
- extent management local;
//創(chuàng)建用戶并指定表空間
- create user username identified by password
- default tablespace test_data
- temporary tablespace test_temp;
//給用戶授予權(quán)限
- grant connect,resource to username;
//以后以該用戶登錄,創(chuàng)建的任何數(shù)據(jù)庫對象都屬于test_temp 和test_data表空間,這就不用在每創(chuàng)建一個對象給其指定表空間了。
【編輯推薦】
責(zé)任編輯:段燃
來源:
互聯(lián)網(wǎng)