Oracle 创建表空间

Oracle 创建表空间

--创建表空间
create tablespace tbs_name datafile 'd:\database\db_name\db_name1.dat' size 10m autoextend on next 100m maxsize 32767m;
-- 新增数据文件
alter tablespace tbs_name add datafile 'd:\database\db_name\db_name2.dat' size 10m autoextend on next 100m maxsize 32767m;

-- 修订redo日志
-- alter database drop logfile group 1;
-- alter database drop logfile group 2;
-- alter database drop logfile group 3;

alter database add logfile group 4 ('d:\database\db_name\redo04.log') size 1g; 
alter database add logfile group 5 ('d:\database\db_name\redo05.log') size 1g; 
alter database add logfile group 6 ('d:\database\db_name\redo06.log') size 1g; 

-- 取消密码过期限制
alter profile default  limit password_life_time unlimited;  
commit;  

--创建用户
create user user_name identified by usser_pwd 
default tablespace tbs_name
temporary tablespace temp;

--分配角色
grant "dba" to user_name with admin option;
grant "connect" to user_name with admin option;
alter user user_name default role "dba","connect";

-- 赋权
grant create any trigger to user_name;

你可能感兴趣的:(oracle)