Oracle数据库添表和表空间

1、登录

sqlplus / as sysdba;//登陆sys帐户

sqlplus sys as sysdba;//同上

sqlplus scott/tiger;//登陆普通用户scott


2、创建表空间

create tablespace user_data
logging
datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;


3、创建用户并授予表空间

create user username identified by password
default tablespace user_data
temporary tablespace user_temp;


4、用户授权

grant connect,resource,dba to username;

posted @ 2016-06-19 20:19  mosakashaka  阅读(108)  评论(0编辑  收藏  举报