Oracle数据库命令整理:
创建流程:
--1.建立表空间
建立表空间(一般建N个存数据的表空间和一个索引空间):
create tablespace 表空间名 datafile ' 路径(要先建好路径)\***_01.dbf' size 1024M autoextend on next 5M maxsize 3000M; ##autoextend on是自动增长的意思
alter tablespace 表空间名 add datafile '路径(要先建好路径)\***_02.dbf' size 1024M autoextend ON next 100M maxsize 5120M ;
--2.建用户
create user 用户名 identified by 密码
default tablespace 表空间名
temporary tablespace temp
profile DEFAULT;
--3.赋权
grant connect to 表空间名;
grant resource to 表空间名;
grant dba to 表空间名;
grant create any sequence to 表空间名;
grant create any table to 表空间名;
grant delete any table to 表空间名;
grant insert any table to 表空间名;
grant select any table to 表空间名;
--4. 系统权限
grant unlimited tablespace to 表空间名;
grant execute any procedure to 表空间名;
创建流程:
--1.建立表空间
建立表空间(一般建N个存数据的表空间和一个索引空间):
create tablespace 表空间名 datafile ' 路径(要先建好路径)\***_01.dbf' size 1024M autoextend on next 5M maxsize 3000M; ##autoextend on是自动增长的意思
alter tablespace 表空间名 add datafile '路径(要先建好路径)\***_02.dbf' size 1024M autoextend ON next 100M maxsize 5120M ;
--2.建用户
create user 用户名 identified by 密码
default tablespace 表空间名
temporary tablespace temp
profile DEFAULT;
--3.赋权
grant connect to 表空间名;
grant resource to 表空间名;
grant dba to 表空间名;
grant create any sequence to 表空间名;
grant create any table to 表空间名;
grant delete any table to 表空间名;
grant insert any table to 表空间名;
grant select any table to 表空间名;
--4. 系统权限
grant unlimited tablespace to 表空间名;
grant execute any procedure to 表空间名;