PL/SQL 创建用户及表空间授权等

--创建临时表空间

create temporary tablespace test_temp 
tempfile 'd:\oracle\product\10.2.0\oradata\test\test_temp01.dbf' 
size 32m 
autoextend on 
next 32m maxsize 2048m
extent management local;

--创建数据表空间
create tablespace test_data
logging
datafile 'd:\oracle\product\10.2.0\oradata\test\test_data01.dbf' 
size 32m 
autoextend on 
next 32m maxsize 2048m
extent management local;

--创建用户并指定表空间
create user test identified by test
default tablespace test_data
temporary tablespace test_temp;

--给用户授予权限

grant connect,resource,dba to test;

hibnerate.sequece
--以test用户登录后创建sequence
CREATE SEQUENCE  "test"."XTGL_SEQUENCE"  
   MINVALUE 1 MAXVALUE 999999999999999999999999999 
   INCREMENT BY 1 
   START WITH 3021
   CACHE 20 NOORDER  NOCYCLE ;

你可能感兴趣的:(pl/sql)