简单快捷的Oracle建库操作
--创建数据库,并指定空间
create tablespace [数据库名] datafile '[数据库存储地址]\[数据库名].dbf' size [分派空间大小];
例:create tablespace DBNAME datafile 'C:\oradata\DBNAME .dbf' size 500M;
--创建账户:分配默认空间
create user [用户名] identified by "[你的密码]" profile DEFAULT ACCOUNT UNLOCK;
例:create user USERNAME identified by "wdoor" profile DEFAULT ACCOUNT UNLOCK;
--创建账户:分配指定表空间,并分配权限
create user [用户名] identified by "[你的密码]" default tablespace [数据库名] profile DEFAULT ACCOUNT UNLOCK;
例:
create user USERNAME identified by "wdoor" default tablespace DBNAME profile DEFAULT ACCOUNT UNLOCK;
grant connect to DBNAME ;
grant resource to DBNAME ;
grant dba to DBNAME ;
grant unlimited tablespace to DBNAME ;