1.新建数据库
在配置和移植工具中,按照 Database Configuration Assistant创建。
(一般默认即可,记得记住默认密码,将来的sys,system用户等都是这个默认密码,如果不特别设置的话)
(scott等用户是锁定的状态,解锁以后再讲)
2.新建表空间
create tablespace test (test是表空间名,test1.dbf是表空间的数据文件存在方式。一个表空间可以有多个数据文件方式)
datafile 'c:/oracle/oradata/orcl9/test1.dbf' size 50M
default storage (initial 500K
Next 500K
minextents 1
maxextents unlimited
pctincrease 0);
3.新建用户
create user 用户名 identified by 密码 default tablespace 表空间名;
4.给用户赋权限
grant resource,connect,dba to 用户名;
grant unlimited tablespace to 用户名;
到此为止,就可以用新建用户登录了。详细操作,下篇讲解。