1.创建用户,并分配权限
-- 数据目录根据实际环境替换 --创建用户表空间 CREATE TABLESPACE namespace DATAFILE '/home/app/oracle/oradata/func27/namespace.dbf' SIZE 500M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M; --创建用户 --appuser CREATE USER appuser IDENTIFIED BY appuser DEFAULT TABLESPACE namespace PROFILE DEFAULT ACCOUNT UNLOCK; GRANT CONNECT TO appuser; GRANT RESOURCE TO appuser; GRANT CREATE SYNONYM TO appuser; ALTER USER appuser DEFAULT ROLE ALL; GRANT UNLIMITED TABLESPACE TO appuser; ALTER USER appuser QUOTA UNLIMITED ON app; --创建用户 --app CREATE USER app IDENTIFIED BY app DEFAULT TABLESPACE app PROFILE DEFAULT ACCOUNT UNLOCK; GRANT CONNECT TO app; GRANT RESOURCE TO app; GRANT CREATE ANY SYNONYM TO app; GRANT CREATE PROCEDURE TO app; GRANT CREATE VIEW TO app; GRANT CREATE SESSION TO app; GRANT CREATE SEQUENCE TO app; GRANT CREATE TABLE TO app; ALTER USER app DEFAULT ROLE ALL; GRANT UNLIMITED TABLESPACE TO app; ALTER USER app QUOTA UNLIMITED ON app;