700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > ORACLE创建用户sql 赋权

ORACLE创建用户sql 赋权

时间:2024-02-10 06:18:08

相关推荐

ORACLE创建用户sql 赋权

ORACLE创建用户sql、赋权

创建用户修改密码赋权表查询赋权创建表空间将表空间分配给用户删除表空间

创建用户

create user test identified by "123456" default tablespace test;

修改密码

alter user test identified by "123456";

赋权

grant connect, resource to test;grant dba to test;grant create session,create table,create view,create sequence,create procedure,unlimited tablespace to test;

表查询赋权

GRANT SELECT ON DBA_MVIEWS TO scott;

创建表空间

create tablespace testloggingdatafile 'E:\NEW\ORADATA\ORCL\test.DBF'size 50mautoextend onnext 100m MAXSIZE unlimited extent management local;

将表空间分配给用户

alter user test default tablespace test;

删除表空间

--删除空的表空间,但是不包含物理文件 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;

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。