oracle创建用户

表空间:CQHR_DATA
用户名:cqhr
密码:cqhr
在plsql中执行下边语句

CREATE TABLESPACE CQHR_DATA
LOGGING
DATAFILE 'CQHR_DATA.dbf' SIZE 2048M AUTOEXTEND ON NEXT 5M MAXSIZE 32767M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

create temporary tablespace CQHR_TEMP
tempfile 'CQHR_TEMP.dbf' size 1024M
autoextend on
next 50M
maxsize 4096M;

create user cqhr
default tablespace CQHR_DATA
profile DEFAULT
password cqhr
quota unlimited on CQHR_DATA;

plsql登录sys/admin@SYSDBA在user中创建对象录入用户名和密码

create user cqhr
identified by cqhr
default tablespace CQHR_DATA
temporary tablespace CQHR_TEMP
profile DEFAULT
quota unlimited on CQHR_DATA;


CREATE TABLESPACE CQHR_INDEX
DATAFILE 'D:oracleproduct10.2.0oradatacqhrCQHR_INDEX.DBF' SIZE 64M
AUTOEXTEND ON
DEFAULT STORAGE (INITIAL 500K NEXT 500K MINEXTENTS 2 MAXEXTENTS UNLIMITED);


grant execute on DBMS_PIPE to cqhr;
-- Grant/Revoke role privileges
grant connect to cqhr;
grant resource to cqhr;
-- Grant/Revoke system privileges
grant alter database link to cqhr;
grant create any assembly to cqhr;
grant create any index to cqhr;
grant create any procedure to cqhr;
grant create any sequence to cqhr;
grant create any table to cqhr;
grant create any trigger to cqhr;
grant create any view to cqhr;
grant create database link to cqhr;
grant debug any procedure to cqhr;
grant debug connect session to cqhr;
grant unlimited tablespace to cqhr;

原文地址:https://www.cnblogs.com/ydph/p/ydph.html