2. oracle创建表空间、用户并设置默认表空间、授权
1.创建用户并设置默认表空间
create tablespace tablespacename datafile 'tablespacename.dbf' size 200m autoextend on next 10m maxsize unlimited;(oracle默认位置)
create tablespace tablespacename datafile 'D:\orcletablespace\tablespacename.dbf' size 200m autoextend on next 10m maxsize unlimited;
create temporary tablespace temptablespacename tempfile 'D:\orcletablespace\temptablespacename.dbf' size 200m autoextend on next 32m maxsize 2048m extent management local;
create user username identified by password default tablespace tablespacename temporary tablespace temptablespacename;
grant connect,resource,dba to username;
附:
--删除数据库用户
drop user test cascade;
--查询用户对应的表空间及临时表空间
select t.username,t.default_tablespace, t.temporary_tablespace from dba_users t ;
--查询表空间及其对应的物理路径
select tablespace_name, file_id,file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name;
--给原表空间扩展物理文件
alter tablespace TEST add datafile '/oracle/data/dbf/TEST_EXTEND.dbf' size 1000m autoextend on next 200m maxsize 4000m;
alter tablespace TEST add datafile '/oracle/data/dbf/TEST_EXTEND.dbf' size 1000m autoextend on next 200m maxsize unlimited;
--查询oracle中directory路径
select * from dba_directories;
最新文章
- jetty项目中静态文件不能修改问题
- 64位CentOS源码编译方式安装wine
- POJ 3320 尺取法,Hash,map标记
- 常用IT类英文词汇 - 1
- gulp-uglify《JS压缩》----gulp系列(四)
- 将 jsp 页面的值 传到struts2 action中(不是表单中的值)
- Redis + Jedis + Spring整合遇到的异常(转)
- js中document.write()使用方法
- BZOJ 3208: 花神的秒题计划Ⅰ
- spring +springmvc+mybatis组合总结
- attr与prop html与text
- bzoj4767两双手 容斥+组合
- 【详记MySql问题大全集】三、安装之后没有my.ini配置文件怎么办
- java中的排序--排序容器_TreeSet与TreeMap
- spring各个版本源码
- Red Hat7.2 上安装 MySQL5.5.58
- [转载]显示SVN控制台
- PostgreSQL索引介绍
- 常用模块之 shutil,json,pickle,shelve,xml,configparser
- 1003. [ZJOI2006]物流运输【区间DP+最短路】