信念树下
--梦想只是不能实现的,想要实现就要有计划。
posts - 5,comments - 0,trackbacks - 0

以管理员身份登录:
1.首先,创建(新)用户:
    create user username identified by password;
    username:新用户名的用户名
    password: 新用户的密码
也可以不创建新用户,而仍然用以前的用户,如:继续利用scott用户

2.创建表空间:
    create tablespace tablespacename datafile 'd:\data.dbf' size xxxm;
    tablespacename:表空间的名字
    d:\data.dbf':表空间的存储位置
    xxx表空间的大小,m单位为兆(M)
3.将空间分配给用户:
   alert user username default tablespace tablespacename;
   将名字为tablespacename的表空间分配给username

4.给用户授权:
   grant create session,create table,unlimited tablespace to username;

5.然后再以楼主自己创建的用户登录,登录之后创建表即可。
conn username/password;
创建表用create table.

-------------------

SQL> create user selftestdb identified by qwe123;

SQL> create tablespace selftestdbspace datafile 'E:\oradata\lselftestdbspace01' size 2048m;

SQL> alter user selftestdb default tablespace selftestdbspace;

SQL> grant create session,create table,unlimited tablespace to selftestdb;

这样就创建了,一个用户名为selftestdb,密码为qwe123,表空间是'E:\oradata\lselftestdbspace01' ,的数据库。
size是数据库大小。

posted on 2010-10-27 09:14 三角形 阅读(188) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: