ITeye博客

创建oracle表空间

winhyt · 2010-10-17 00:20 · oracle · 数据库 · Oracle · Markdown

一、创建临时表空间 下面的语句是错误的:如果创建临时表空间 需要加上temporary 关键字,否则就会报 “ORA-02180: 无效的 CREATE TABLESPACE 选项“错误create tablespace ts_tab_tmp tempfile 'e:\oracle\product\10.2.0\oradata\orcl\ts_tab_tmp.dbf' size 100M autoextend on next 2M maxsize 1024M extent management local;

正确的命令语句是: create temporary tablespace ts_tab_tmp tempfile 'e:\oracle\product\10.2.0\oradata\orcl\ts_tab_tmp.dbf' size 100M autoextend on next 2M maxsize 1024M extent management local;

二、创建表空间: create tablespace ts_tab_base datafile 'e:\oracle\product\10.2.0\oradata\orcl\ts_tab_base.dbf' size 100M autoextend on next 2M maxsize 1024M extent management local; 三、创建用户并制定表空间 create user crm_app_user identified by bss_crm_xxp15 default tablespace ts_tab_base temporary tablespace ts_tab_tmp; 四、给创建的用户赋权: --如果不知道该赋什么权限给用户可以通过下面两个语句查找具有类似功能的用户 select * from dba_sys_privs where grantee = 'SCOTT'

select * from dba_role_privs where grantee = 'SCOTT' --给用户赋权 grant CONNECT,RESOURCE to crm_app_user;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。