數據庫相關的操作:
說明:
oracle數據庫一般初始爲:
sys;//系統管理員,擁有最高權限
system;//本地管理員,次高權限
在此基礎上創建
1:創建用戶:
create username identified by password
2:創建表空間
create tablespace 空間名 datafile '*************/****.dbf'
例如:
create tablespace 空間名 datafile 'D:\oracle\oradata\Oracle9i\user_data.db' 必須保證 D:\oracle\oradata\Oracle9i\ 路徑是存在的
可以使用此語句查詢 select * from dba_data_files
3:將空間分配給用戶
alter usr 用戶名 default tablespace 表空間名
4:爲用戶分配權限
grant create session,create table,unlimited tablespace to 用戶名;
create session :爲分配此權限,則用戶無法登陸