Orcle 创建表空间和用户

-- 删除表空间

drop tablespace shanks_data including contents;

 

-- 创建数据表空间
create tablespace shanks_data
datafile 'F:\DevelpoerTools\DataBase\Oracle\app\Administrator\oradata\shanks\shanks_data.dbf'
size 50M autoextend on next 1M maxsize unlimited;

 

-- 创建临时表空间
create temporary tablespace shanks_temp
tempfile 'F:\DevelpoerTools\DataBase\Oracle\app\Administrator\oradata\shanks\shanks_temp.dbf'
size 50M autoextend on next 1M maxsize unlimited;

 

-- 创建用户并指定表空间
create user shanks identified by shanks
default tablespace shanks_data
temporary tablespace shanks_temp;


-- 给用户授予权限
grant connect,resource to shanks;

 

-- 误删表空间文件,修复语句

shutdown immediate;
startup mount
alter database archivelog;
recover tablespace 表空间名

alter database open;

 

你可能感兴趣的:(oracle,F#)