oracle建表空间、用户

建表空间

语法:create tablespace tablespace_name datafile datafile_path size 2048M;

tablespace_name:表空间的名称

datafile_path:数据文件的存储路径,必须有读写的权限,可以用chmod设置

size:表空间大小
举例:create tablespace oacloud datafile '/oracle_data_file/oacloud.dbf' size 2048M;
建用户

语法:create user user_name identified by user_pwd default tablespace tablespace_name;

user_name:用户名

user_pwd:用户密码

tablespace_name:上一步建的表空间
举例:create user dtoa identified by dtoa default tablespace oacloud;
给用户授权
grant connect,resource to dtoa;
grant dba to dtoa;

你可能感兴趣的:(oracle建表空间、用户)