oracle新建用戶以及創(chuàng)建表空間
--創(chuàng)建用戶XXXuser,設置初始密碼XXXpassword
create user XXXuser identified by XXXpassword;
--修改XXXuser的密碼為newPassword
alter user XXXuser identified by newPassword;
--刪除已存在的表空間XXXuser
drop tablespace XXXuser including contents and datafiles;
--創(chuàng)建表空間XXXuser,數(shù)據(jù)文件名為及路徑為D:\XXXuser.dbf
create tablespace XXX_TBS datafile '/u01/app/oracle/oradata/orcl/XXX_TBS.dbf' size 100m autoextend on next 32m maxsize unlimited;
--設置XXXuser用戶默認表空間為XXXuser
alter user XXXuser default tablespace XXXuser;
--根據(jù)實際需要對用戶進行授權開始
grant resource,connect to XXXuser;
grant create session to XXXuser;
grant create table to XXXuser;
grant create view to XXXuser;
grant create tablespace to XXXuser;
grant unlimited tablespace to XXXuser;
grant select any table to XXXuser;
grant select any dictionary to XXXuser;
根據(jù)實際需要給用戶授權

浙公網(wǎng)安備 33010602011771號