#su - Oracle
$ sqlplus /nolog
SQL> connect / as sysdba
--//創建臨時表空間
create temporary tablespace test_temp
tempfile '/data/Oracle/oradata/test/test_temp01.dbf' --//Linux下的文件系統 -
size 64m
autoextend on
next 64m maxsize 2048m
extent management local; --//創建數據表空間
create tablespace test_data
logging
datafile '/data/Oracle/oradata/test/test_data01.dbf' --//Linux下的文件系統
size 64m
autoextend on
next 65m maxsize 2048m
extent management local; --//創建用戶并指定表空間 用戶名和密碼均為"test"
create user test identified by test
default tablespace test_data
temporary tablespace test_temp;
--//給用戶授予權限 grant connect,resource to test; --//刪除表空間
drop tablespace test_temp including CONTENTS and datafiles; --//修改用戶密碼
alter user test identified by new_password; --//刪除用戶
drop user 用戶名 cascade; --//執行該語句請小心,會級聯刪除該用戶下所有對象。
--//給用戶分配權限 SQL> grand connect to test_user;
SQL> grand resource to test_user;
SQL> grand create view to test_user;
建好表后插入數據 查詢數據 要對該表加上引號 如: “表名” 本文出自:億恩科技【www.laynepeng.cn】
服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]
|