col tablespace_name for a10
col file_name for a50
col bytes for 999,999,999
select tablespace_name,file_name,bytes from dba_data_files order by tablespace_name;
col owner for a10;
col segment_name for a30;
col segment_type for a20;
select segment_type,segment_name,owner from dba_segments where tablespace_name='USERS';
create tablespace tbs_test_1 datafile 'D:\OracleFiles\OracleData\datafile1.dbf'
size 10m
extent management local uniform size 256K;
create tablespace tbs_test_2 datafile 'D:\OracleFiles\OracleData\datafile2.dbf'
size 10m
extent management local autoallocate;
create tablespace tbs_test_3 datafile 'D:\OracleFiles\OracleData\datafile3.dbf'
size 20m
extent management local autoallocate
segment space management manual;
create tablespace tbs_test_4 datafile 'D:\OracleFiles\OracleData\datafile4.dbf'
size 20m
extent management local autoallocate
segment space management auto;
alter system set db_16k_cache_size = 16M scope=both;
create tablespace tbs_test_5 datafile 'D:\OracleFiles\OracleData\datafile5.dbf'
size 64m reuse
autoextend on next 4m maxsize unlimited
blocksize 16k
extent management local autoallocate
segment space management auto;
create bigfile tablespace tbs_test_big datafile 'D:\OracleFiles\OracleData\datafilebig.dbf'
size 2g;
alter tablespace users add datafile 'e:\app\Administrator\oradata\orcl\users02.dbf'
size 10m autoextend on next 5m maxsize unlimited;
alter tablespace users drop datafile 'e:\app\Administrator\oradata\orcl\users02.dbf';
create undo tablespace undo_tbs_1
datafile 'D:\OracleFiles\OracleData\undotbs1.dbf'
size100M;
alter tablespace undo_tbs_1
add datafile 'D:\OracleFiles\OracleData\undotbs_add.dbf'
size 2g;
select to_char(begin_time,'hh24:mi:ss') as 开始时间,
to_char(end_time,'hh24:mi:ss') as 结束时,
undoblks as 回退块数
from v$undostat
order by begin_time;
select rn.name,rs.xacts,rs.writes,rs.extents
from v$rollname rn,v$rollstat rs
where rn.usn = rs.usn;
select segment_name, extent_id,bytes,status from dba_undo_extents
where segment_name='_SYSSMU3_991555123$';
create temporary tablespace temp_01 tempfile 'D:\OracleFiles\tempfiles\temp_01.tpf' size 300m;
select file_name,bytes,tablespace_name from dba_temp_files;
create temporary tablespace tp1 tempfile 'D:\OracleFiles\tempfiles\tp1.tpf' size 10m tablespace group group1;
create temporary tablespace tp2 tempfile 'D:\OracleFiles\tempfiles\tp2.tpf' size 20m tablespace group group1;
create temporary tablespace tp3 tempfile 'D:\OracleFiles\tempfiles\tp3.tpf' size 10m tablespace group group3;
alter tablespace tp1 tablespace group group3;
create tablespace tbs_test datafile 'D:\OracleFiles\OracleData\datafile_test.dbf'
size 100m
extent management local autoallocate
segment space management auto; alter database default tablespace tbs_test;
create temporary tablespace temp_test tempfile 'D:\OracleFiles\tempfiles\temp_test.tpf' size 100m;

alter database default temporary tablespace temp_test;

吴裕雄--天生自然ORACLE数据库学习笔记:管理表空间和数据文件的更多相关文章

  1. 吴裕雄--天生自然ORACLE数据库学习笔记:表分区与索引分区

    create table ware_retail_part --创建一个描述商品零售的数据表 ( id integer primary key,--销售编号 retail_date date,--销售 ...

  2. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle数据备份与恢复

    run{ allocate channel ch_1 device type disk format = 'd:\oraclebf\%u_%c.bak'; backup tablespace syst ...

  3. 吴裕雄--天生自然ORACLE数据库学习笔记:过程、函数、触发器和包

    create procedure pro_insertDept is begin ,'市场拓展部','JILIN'); --插入数据记录 commit; --提交数据 dbms_output.put_ ...

  4. 吴裕雄--天生自然ORACLE数据库学习笔记:PL/SQL编程

    set serveroutput on declare a ; b ; c number; begin c:=(a+b)/(a-b); dbms_output.put_line(c); excepti ...

  5. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle 11g的闪回技术

    alter system set db_recovery_file_dest_size=4g scope=both; connect system/1qaz2wsx as sysdba; archiv ...

  6. 吴裕雄--天生自然ORACLE数据库学习笔记:数据导出与导入

    create directory dump_dir as 'd:\dump'; grant read,write on directory dump_dir to scott; --在cmd下 exp ...

  7. 吴裕雄--天生自然ORACLE数据库学习笔记:优化SQL语句

    create or replace procedure trun_table(table_deleted in varchar2) as --创建一个存储过程,传入一个表示表名称的参数,实现清空指定的 ...

  8. 吴裕雄--天生自然ORACLE数据库学习笔记:Oracle系统调优

    --修改 alter system set large_pool_size=64m; --显示 show parameter large_pool_size; select sum(getmisses ...

  9. 吴裕雄--天生自然ORACLE数据库学习笔记:用户管理与权限分配

    create user mr identified by mrsoft default tablespace users temporary tablespace temp; create user ...

  10. 吴裕雄--天生自然ORACLE数据库学习笔记:其它数据对象

    create index emp_deptno_index on emp(deptno) pctfree tablespace users; create bitmap index emp_salar ...

随机推荐

  1. 【 Hibernate 】Hibernate的session更新和删除失败问题

    applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xm ...

  2. mybatis重新回顾

    此次在项目中相遇了mybatis,重新回顾下. 1.resulMap解决了结果集的列名字跟实体setter和getter不匹配的问题 其中property是实体的setter和getter对象,col ...

  3. 计算机二级-C语言-程序填空题-190107记录

    //给定程序的功能是:调用fun函数建立班级通讯录.通讯中记录每位学生的编号,姓名和电话号码.班级的人数和学生的信息从键盘读入,每个人的信息作为一个数据块(代表要使用结构体)写到名为myfile5.d ...

  4. Selenium元素定位之页面检测技巧

    我们在进行web自动化测试的时候进行XPath或者CSS定位,需要检测页面元素定位是否正确,如果用脚本去检测,那么效率是极低的. 一般网上推选装额外的插件来实现页面元素定位检测 如:firebug. ...

  5. List 线性表:ArrayLis,LinkedList

    package seday11.list; import java.util.ArrayList;import java.util.List; /*** @author xingsir * java. ...

  6. 基于springboot实现轮询线程自动执行任务

    本文使用: Timer:这是java自带的java.util.Timer类,这个类允许你调度一个java.util.TimerTask任务.使用这种方式可以让你的程序按照某一个频度执行,但不能在指定时 ...

  7. Xcode 编译运行旧项目报错解决之路

    运行几年前做的项目,发现各种编译报错,一个一个解决记录下: 1.Xcode(Xcode9)编译运行报错,但是在 issue navigatior 栏看不到错误信息: 解决方案:在 show repor ...

  8. MST — Kruskal's algorithm

    算法简介 Kruskal算法可用来求解MST(最小生成树)问题,还可以作为迷宫生成算法等. 算法分析 其实算法不难理解,算法先要将 $ G(V, E) $ 的集合 $ E $ 按权重 $ \Omega ...

  9. Flex:实例

    目的: 代码: <!--pages/index/index.wxml--> <view class="container"> <view class= ...

  10. unittest---unittest错误截图

    在做自动化的过程中,大多数执行者都不在旁边,那么如果用例失败了我们通常看报告上的失败信息,但是这样有时候可能不够清楚的判断到底哪里出了错误,我们还可以通过自动截图的功能,判断用例走到哪里出了错误. 截 ...