几年没碰oracle了,突然要用oracle新建用户 想偷懒复制一波 百度一搜 csdn各种付币 天哪 至于吗...
建表空间、建临时表空间、建用户、赋权、解锁 修改密码
CREATE TABLESPACE bonc001 LOGGING DATAFILE '/oracle/Orabase/oradata/rsdb/bonc001.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
create temporary tablespace bonc001_temp tempfile '/oracle/Orabase/oradata/rsdb/bonc001_temp.dbf' size 100m autoextend on next 32m maxsize 500m extent management local;
create user bonc001 identified by bonc001 default tablespace bonc001 temporary tablespace bonc001_temp;
grant connect,resource to bonc001;
select username from dba_users;
alter user bonc001 account unlock;
sqlplus bonc001/bonc001
##alter user wwweasy identified by 123456;
删除用户语句:
drop user 用户名 cascade;
--删除空的表空间,但是不包含物理文件
drop tablespace tablespace_name;
--删除非空表空间,但是不包含物理文件
drop tablespace tablespace_name including contents;
--删除空表空间,包含物理文件
drop tablespace tablespace_name including datafiles;
--删除非空表空间,包含物理文件
drop tablespace tablespace_name including contents and datafiles;
--如果其他表空间中的表有外键等约束关联到了本表空间中的表的字段,就要加上CASCADE CONSTRAINTS
drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;
浙公网安备 33010602011771号