oracle跟sqlserver的创建数据库有很大不同,sqlserver的数据库在oracle中称作为表空间。
下面是oracle 创建表空间及用户的具体方法,表空间"heycode",用户名"c##heycode",密码"111111"
(oracle 12 用户名要以c##开头?)
--创建表空间
create tablespace heycode
datafile 'D:\app\oracle\oradata\orcl\heycode.dbf'
size 200M
autoextend on next 5M maxsize 3000M;
--创建用户
CREATE USER c##heycode IDENTIFIED BY 111111
PROFILE DEFAULT
DEFAULT TABLESPACE heycode
ACCOUNT UNLOCK;
--设置权限
grant connect,resource to c##heycode;
grant create any sequence to c##heycode;
grant create any table to c##heycode;
grant delete any table to c##heycode;
grant insert any table to c##heycode;
grant select any table to c##heycode;
grant unlimited tablespace to c##heycode;
grant execute any procedure to c##heycode;
grant update any table to c##heycode;
grant create any view to c##heycode;