Heim  >  Artikel  >  Datenbank  >  ORACLE 创建表空间和用户

ORACLE 创建表空间和用户

WBOY
WBOYOriginal
2016-06-07 15:19:041419Durchsuche

#创建表空间 CREATE SMALLFILE TABLESPACE USERNAME DATAFILE '/home/oracle/oradata/orcl/USERNAME' SIZE 500M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO #修改表空间 alter tablespace USERNAME ADD datafile '/home/oracle/oradata


#创建表空间
CREATE SMALLFILE TABLESPACE "USERNAME" DATAFILE '/home/oracle/oradata/orcl/USERNAME'
SIZE 500M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO


#修改表空间
alter tablespace  USERNAME  ADD datafile '/home/oracle/oradata/orcl/USERNAME.dbf'
size 500m autoextend on next 200m maxsize 3072m;


#删除表空间

DROP TABLESPACE USERNAME INCLUDING CONTENTS AND DATAFILES;

#删除用户

DROP USER 用户名 CASCADE;

#创建用户

 create user 用户名  identified by “密码” default tablespace USERNAME temporary tablespace TEMP profile DEFAULT;


-- Grant/Revoke role privileges 
grant connect to 用户名  with admin option;
grant dba to 用户名  with admin option;
grant resource to 用户名  with admin option;


-- Grant/Revoke system privileges 
grant unlimited tablespace to 用户名  with admin option;



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn