一、對表空間的操作
1、--查看表空間存放位置 select file_name from dba_data_files; 2、--創建表空間 創建表空間名稱為tableName,表空間文件存放路徑為:D:\APP\USER\ORADATA\ORCL\tableName.dbf,表空間的大小200m,自動增長,每次增長20m create tablespace tableName datafile 'D:\APP\USER\ORADATA\ORCL\tableName.dbf' size 200m autoextend on next 20m; 3、--刪除表空間 drop tablespace tableName including contents and datafiles;
二、對用戶的操作
--創建用戶 create user style identified by style --創建用戶名style默認密碼style default tablespace style --默認表空間style temporary tablespace temp; --默認臨時表空間temp --刪除用戶 drop user style cascade;
三、權限
--給用戶style授權 grant dba to style; --授予管理員權限 grant connect to style; --授予連接權限 grant resource to style; --授予開發人員權限 --刪除權限 revoke connect to 用戶名; --授權表的權限給別的用戶 grant alter,delete,update,insert,select on 表名 to 用戶名;