【创建数据库】
前提以管理员身份登录
1,首先,创建(新)用户
create user username identified by userpassword;
username:新用户的用户名
userpassword:新用户的密码
2,创建表空间
create tablespace tablespacename datafile'd:\data.dbf' size xxm;
tablespacename:表空间名
d:'\data.dbf'表空间的存储位置
xxx表空间的大小,单位为兆
3,将空间分配给客户
alter user username default tablespace tablespacename;
4,给用户授权
grant create session, create table,unlimited tablespace to username;
5,最后用新用户对应的用户密码登陆即可
sql语句如下
create user test identified by test;
create tablespace testname datafile 'd:\datas.dbf' size 50m;
alter user test default tablespace testname;
grant create session,create table,unlimited tablespace to test;
by Tmall coupon to www.591q.cn