代碼: ...
代碼:
//dba賬戶登錄 sqlplus 請輸入用戶名:dpp_data as sysdba 請輸入口令:dpp_data //創建賬號 create user techrpt_data identified by techrpt_data; //創建臨時表空間 create temporary tablespace TECHRPT_DATA_TEMP tempfile 'D:\ORACLE\ORADATA\ORCL\TECHRPT_DATA_TEMP.dbf' size 32m autoextend on next 32m maxsize 2048m extent management local; //將臨時表空間分配給用戶 alter user techrpt_data temporary tablespace TECHRPT_DATA_TEMP; //創建表空間 create tablespace TECHRPT_DATA logging datafile 'D:\ORACLE\ORADATA\ORCL\TECHRPT_DATA.ora' size 50m autoextend on next 50m maxsize 2048m extent management local; //將表空間分配給用戶 alter user techrpt_data default tablespace TECHRPT_DATA; //授權 grant dba to techrpt_data; grant connect,resource to techrpt_data; grant create session to techrpt_data; grant create any sequence to techrpt_data; grant create any table to techrpt_data; grant delete any table to techrpt_data; grant insert any table to techrpt_data; grant select any table to techrpt_data; grant update any table to techrpt_data; grant unlimited tablespace to techrpt_data; grant execute any procedure to techrpt_data; grant create any view to techrpt_data; grant select on v_$statname to techrpt_data; grant select on v_$sesstat to techrpt_data; grant select on v_$session to techrpt_data; grant select on v_$mystat to techrpt_data; //提交 commit; //退出 quit; //刪除用戶 drop user techrpt_data cascade; //刪除表空間 drop tablespace techrpt_data including contents and datafiles; //修改密碼 alter user system identified by system;