#首先创建表空间、存放路径、设置表空间大小
create tablespace tbs_ams datafile '+DATA/pdorcl1/datafile/ams1.dbf' size 1024m
#自动扩展到31G
AUTOEXTEND ON NEXT 64K MAXSIZE 31G NOLOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
#创建用户及密码、指定表空间
CREATE USER asm IDENTIFIED BY HGg$1jGFdsf
DEFAULT TABLESPACE tbs_ams
TEMPORARY TABLESPACE TEMP;
#授权,这里只赋予部分权限,还可以加上。全部赋权用all
grant CREATE SESSION, CONNECT,CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,
ALTER ANY TABLE, ALTER ANY PROCEDURE,
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,
SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE
TO asm;