Bo's Oracle Station

查看: 2340|回复: 0

课程第15/16/17次(2017-03-27星期一,2017-03-29星期三和2017-03-31星期五)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-3-28 10:37:09 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2017-4-1 10:49 编辑

上完1Z0-052第10章:UNDO
上完1Z0-052的Chapter0和1Z0-053的Chapter0
进行1Z0-052第1章
1Z0-051共12章(上完10章),1Z0-052共19章(上完6章),1Z0-053共21章(上完1章)
总共上完全部52章中的17章
  1. select  * from dba_tablespaces ;

  2. alter tablespace undotbs1 retention guarantee;

  3. alter tablespace undotbs1 retention noguarantee;
  4. -------
  5. select * from dba_temp_files;

  6. alter tablespace temp add tempfile '/u01/app/oracle/oradata/orcl/temp02.dbf'  size 10G;

  7. alter tablespace temp drop tempfile 1;

  8. create undo tablespace undotbs2 datafile size 256k autoextend off ;

  9. ------

  10. select  * from dba_rollback_segs;

  11. select  * from dba_alert_history  order by creation_time desc ;
  12. -----
  13. select  * from dba_data_files where tablespace_name='UNDOTBS2';

  14. alter database datafile '+DATA/orcl/datafile/undotbs2.264.939759457' resize 10M;
  15. ----

  16. select  salary from hr.employees
  17. as of timestamp to_timestamp('2017-03-27:20:40:06','YYYY-MM-DD:HH24:MI:SS')
  18. where employee_id=100;

  19. ---
  20. create undo tablespace undotbs1 ;

  21. alter system set undo_tablespace=undotbs1;

  22. drop tablespace undotbs2;

  23. select * from v$transaction;

  24. alter system flush buffer_cache;

  25. select  salary from hr.employees
  26. as of timestamp to_timestamp('2017-03-27:20:40:06','YYYY-MM-DD:HH24:MI:SS')
  27. where employee_id=100;
复制代码
  1. select   d.RESETLOGS_CHANGE#,
  2.      d.CHECKPOINT_CHANGE# ,
  3.       d.CURRENT_SCN     from v_$database d;

  4. select   df.NAaME, df.CHECKPOINT_CHANGE#  from v_$datafile df;

  5. select * from v$thread;

  6. alter tablespace users online;

  7. select  * from v$log;

  8. select  * from v$archived_log  order by 5 desc , 6 desc;

  9. -----
  10. alter system switch logfile;

  11. alter system checkpoint;
  12. ----



  13. ----

  14. alter tablespace users offline;

  15. alter system checkpoint;

  16. ----
  17. alter tablespace example read only;

  18. alter tablespace example read write;
  19. ----

复制代码




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-18 20:59 , Processed in 0.032795 second(s), 24 queries .

快速回复 返回顶部 返回列表