Bo's Oracle Station

查看: 2814|回复: 0

课程第25次(2017-04-17星期一)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-4-21 16:12:13 | 显示全部楼层 |阅读模式
上完1Z0-053的第10章
1Z0-051共12章(上完10章),1Z0-052共19章(上完10章),1Z0-053共21章(上完3章)

总共上完全部52章中的23章
  1. select    d.SUPPLEMENTAL_LOG_DATA_MIN,
  2.              d.SUPPLEMENTAL_LOG_DATA_UI,
  3.              d.SUPPLEMENTAL_LOG_DATA_PK,
  4.              d.SUPPLEMENTAL_LOG_DATA_FK,
  5.              d.LOG_MODE
  6.   from v_$database  d;
  7.   
  8. alter database add supplemental  log data;
  9.    
  10. alter database add supplemental  log data ( primary key ) columns;

  11. select   *    from flashback_transaction_query  ftq
  12.   where ftq.logon_user='HR' and ftq.table_name='T_NOCASCADE'
  13.     and ftq.table_owner='HR'
  14. order by ftq.commit_scn desc;
  15.      


  16. begin
  17.     dbms_flashback.transaction_backout(1,xid_array('01000700AD020000'));
  18. end;

  19. select   *    from flashback_transaction_query  ftq
  20.   where ftq.logon_user='HR' and ftq.table_name='T_CASCADE'
  21.     and ftq.table_owner='HR'
  22. order by ftq.commit_scn desc;
  23.      


  24. begin
  25.     dbms_flashback.transaction_backout(1,xid_array('050021009A030000'),
  26.       dbms_flashback.cascade);
  27. end;

  28. select  * from  hr.t_cascade;

  29. select  * from dba_flashback_txn_report;

  30. select  * from dba_flashback_txn_state;
  31.   
  32. commit;

  33. ----------------
  34.   select   *    from flashback_transaction_query  ftq
  35.   where ftq.logon_user='HR' and ftq.table_name='T_NOCASCADE_FORCE'
  36.     and ftq.table_owner='HR'
  37. order by ftq.commit_scn desc;
  38.      


  39. begin
  40.     dbms_flashback.transaction_backout(1,xid_array('0200190077030000'),
  41.       dbms_flashback.nocascade_force);
  42. end;
  43.   select  * from dba_flashback_txn_state;
  44. select  * from  hr.t_nocascade_force;

  45. select  * from dba_flashback_txn_report;


  46. commit;
  47. --------------------
  48.   select   *    from flashback_transaction_query  ftq
  49.   where ftq.logon_user='HR' and ftq.table_name='T_NONCONFLICT_ONLY'
  50.     and ftq.table_owner='HR'
  51. order by ftq.commit_scn desc;
  52.      


  53. begin
  54.     dbms_flashback.transaction_backout(1,xid_array('080018004C040000'),
  55.       dbms_flashback.nonconflict_only);
  56. end;
  57.   select  * from dba_flashback_txn_state;
  58. select  * from  hr.t_nocascade_force;

  59. select  * from dba_flashback_txn_report;


  60. commit;
  61. -----
  62. select  * from dba_flashback_archive;

  63. create flashback archive fda1
  64. tablespace users quota 10M retention 2 year;

  65. create flashback archive  default fda2
  66. tablespace users  quota 10M retention 3 day;

  67. alter flashback archive fda1 set default;

  68. select  * from dba_flashback_archive_ts;

  69. alter flashback archive fda1 add tablespace example quota 5M ;

  70. alter flashback archive fda1  modify   tablespace  users quota  20M;

  71. alter flashback archive fda1 modify   retention 1 year;

  72. --revoke flashback archive on fda1 from hr;

  73. select  * from dba_flashback_archive_tables;

  74. grant flashback archive on fda1 to hr;

  75. select  * from hr.SYS_FBA_HIST_73933;

  76. create undo tablespace undotbs2 datafile  size 10M ;
  77. ----------------
  78. alter flashback archive fda1 purge  before timestamp
  79. (systimestamp - interval '0  00:00:01'  DAY TO SECOND ) ;

  80. alter  table hr.employees no   flashback archive ;
复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 03:19 , Processed in 0.044342 second(s), 24 queries .

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