oracle创建表空间和用户

创建表空间

1
create tablespace tp datafile '/opt/app/oracle/oradata/orcl/orclpdb/tp.dbf' size 200 m autoextend on next 10 m maxsize unlimited ;

创建用户和赋予相关权限

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
-- Create the user
create user 用户名
default tablespace TP
temporary tablespace TEMP
identified by 密码
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to 用户名;
-- grant dba to 用户名;
grant resource to 用户名;
-- Grant/Revoke system privileges
grant create session to 用户名;
grant delete any table to 用户名;
grant execute any class to 用户名;
grant execute any procedure to 用户名;
grant insert any table to 用户名;
grant select any dictionary to 用户名;
grant select any sequence to 用户名;
grant select any table to 用户名;
grant select any transaction to 用户名;
grant under any table to 用户名;
grant under any type to 用户名;
grant under any view to 用户名;
grant unlimited tablespace to 用户名;
grant update any table to 用户名;
GRANT IMP_FULL_DATABASE to 用户名;
GRANT EXP_FULL_DATABASE to 用户名;

grant create any table to 用户名;
grant drop any table to 用户名;


GRANT debug any procedure, debug connect session TO 用户名;
作者

buubiu

发布于

2015-09-06

更新于

2024-01-25

许可协议