{"id":1601,"date":"2018-01-23T18:40:52","date_gmt":"2018-01-23T09:40:52","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=1601"},"modified":"2018-01-23T18:48:22","modified_gmt":"2018-01-23T09:48:22","slug":"flashback-versions-query-transaction-query","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=1601","title":{"rendered":"Flashback Versions Query &#038; Transaction Query"},"content":{"rendered":"<p style=\"text-align: justify; margin-left: 56pt\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/01\/012318_0940_FlashbackVe1.jpg?w=640\" alt=\"\" data-recalc-dims=\"1\"\/>\n\t<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">Oracle9i\uc758 Flashback Query\ub97c \ud655\uc7a5\ud55c \ub0b4\uc6a9\uc774 <span style=\"color:blue\">Flashback Versions Query<\/span>\uc640 <span style=\"color:blue\">Flashback Transaction Query<\/span>\uc774\ub2e4. Flashback Versions Query\ub294 Select\uc2dc <span style=\"color:blue\">versions between<\/span>\uba85\ub839\uc744 \ub123\uc73c\uba74 \ud574\ub2f9 \uc815\ubcf4\uc758 history \uc815\ubcf4\uac00 \ub098\uc628\ub2e4. Flashback Versions Query\uc640 Flashback Transaction Query\ub294 <span style=\"color:blue\"><strong>undo tablespace<\/strong><\/span>\uc758 \uc815\ubcf4\ub97c \uc774\uc6a9\ud558\uae30 \ub54c\ubb38\uc5d0, flashback log\uc640\ub294 \uad00\ub828\uc774 \uc5c6\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 50pt\">\n<h3>Flashback Versions Query Test<br \/>\n<\/h3>\n<\/p>\n<p style=\"text-align: justify; margin-left: 60pt\">\n<h4>\ud14c\uc2a4\ud2b8 \uac1c\uc694<br \/>\n<\/h4>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">Flashback Version Query\ub294 \ub450 \uac00\uc9c0\ub85c \ub098\ub25c\ub2e4. \ud558\ub098\ub294 System Change Number(SCN)\ub97c \uae30\uc900\uc73c\ub85c \ud558\ub294 \uac83\uacfc \ub2e4\ub978 \ud558\ub098\ub294 timestamp\ub97c \uae30\uc900\uc73c\ub85c \ud558\ub294 \uac83\uc774\ub2e4. \uc5ec\uae30\uc11c\ub294 \ub450 \uac00\uc9c0\ub97c \ub2e4 \ud14c\uc2a4\ud2b8 \ud574\ubcf4\uaca0\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 60pt\">\n<h4>\ud14c\uc2a4\ud2b8 \ud658\uacbd<br \/>\n<\/h4>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">Undo data\ub97c \uc774\uc6a9\ud558\uc5ec \ud574\ub2f9 \uc815\ubcf4\uc758 history\ub97c \ubcfc \uc218 \uc788\ub294 Flashback Versions Query\ub97c \ud14c\uc2a4\ud2b8 \ud574\ubcf4\uaca0\ub2e4. Undo \uc815\ubcf4\uc758 retention guarantee\ub97c \uc704\ud574\uc11c\ub294 undo tablespace\ub97c retention guarantee\ud574\uc57c \ud55c\ub2e4. \uc774 \ub0b4\uc6a9\uc740 \uc704\uc5d0\uc11c \uc5b8\uae09\ud558\uc600\uc73c\ubbc0\ub85c \uc5ec\uae30\uc11c\ub294 \uc0dd\ub7b5\ud55c\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">Flashback Versions Query\ub294 Flashback database\uc640 \uc0c1\uad00\uc5c6\uc74c\uc744 \ud655\uc778\ud574 \ubcf4\uaca0\ub2e4.\n<\/p>\n<div style=\"margin-left: 56pt\">\n<table style=\"border-collapse:collapse\" border=\"0\">\n<colgroup>\n<col style=\"width:525px\"\/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt\">\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt;<span style=\"background-color:#d9d9d9\"> conn \/ as sysdba<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">Connected.<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select <span style=\"color:blue\">flashback_on<\/span> from v$database;<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">FLASHB<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">NO<br \/>\n<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: justify; margin-left: 60pt\">\n<h4>\ud14c\uc2a4\ud2b8 \uc608\uc81c<br \/>\n<\/h4>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\ub450 \uac00\uc9c0 versions query\uc5d0 \ub300\ud574 test\ud574\ubcf4\uaca0\ub2e4.\n<\/p>\n<div style=\"margin-left: 56pt\">\n<table style=\"border-collapse:collapse\" border=\"0\">\n<colgroup>\n<col style=\"width:525px\"\/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt\">\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">conn scott\/tiger<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">Connected.<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select to_char(sysdate, &#8216;YY-MM-DD HH24:MI:SS&#8217;) from dual;<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">TO_CHAR(SYSDATE,&#8217;YY-MM-DDHH24:MI:S<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">03-10-10 16:06:58<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select empno, ename, job, sal, deptno from test_emp;<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">     EMPNO ENAME                JOB                       SAL     DEPTNO<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      7782 CLARK                MANAGER                  2450         10<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      7839 KING                 PRESIDENT                5000         10<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">7934 MILLER               CLERK                    1300         10<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">update test_emp set sal = 1400 where ename =&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1 row updated.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select empno, ename, job, sal, deptno from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2<span style=\"background-color:#d9d9d9\"><br \/>\n\t\t\t\t\t\t\t\t\t<span style=\"color:blue\">versions between scn minvalue and maxvalue<br \/>\n<\/span><\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  3<span style=\"background-color:#d9d9d9\">  where ename=&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">     EMPNO ENAME                JOB                       SAL     DEPTNO<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">      7934 MILLER               CLERK                    1400         10<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">7934 MILLER               CLERK                    1300         10<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select empno, ename, job, sal, deptno from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"color:blue; background-color:#d9d9d9\">versions between timestamp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  3  <span style=\"background-color:#d9d9d9\">to_timestamp(&#8217;03-10-10 16:06:58&#8242;, &#8216;YY-MM-DD HH24:MI:SS&#8217;) AND<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  4  <span style=\"background-color:#d9d9d9\">to_timestamp(sysdate)<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  5  <span style=\"background-color:#d9d9d9\">where ename =&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">select empno, ename, job, sal, deptno from test_emp<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">                                           *<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">ERROR at line 1:<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">ORA-30054: invalid upper limit snapshot expression<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select empno, ename, job, sal, deptno from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"color:blue; background-color:#d9d9d9\">versions between timestamp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\"><span style=\"color:blue\"><br \/>\n\t\t\t\t\t\t\t\t<\/span> 3<span style=\"color:blue\"><br \/>\n\t\t\t\t\t\t\t\t<\/span><span style=\"background-color:#d9d9d9\">to_timestamp(&#8217;03-10-10 10:06:58&#8242;, &#8216;YY-MM-DD HH24:MI:SS&#8217;) AND<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  4  <span style=\"background-color:#d9d9d9\">to_timestamp(sysdate) where ename =&#8217;MIILER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">select empno, ename, job, sal, deptno from test_emp<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">                                           *<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">ERROR at line 1:<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">ORA-30052: invalid lower limit snapshot expression<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: justify; margin-left: 56pt\"><span style=\"color:blue\">VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE<\/span> \ub294 \ubcc4 \ubb38\uc81c \uc5c6\uc774 \uc218\ud589\ub418\uc5c8\ub2e4. \uadf8\ub7ec\ub098 <span style=\"color:blue\">VERSIONS BETWEEN TIMESTAMP<\/span>\ub294 error\ub97c \ub5a8\uc5b4\ub728\ub838\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\"><span style=\"color:blue; font-family:Courier; font-size:9pt\">ORA-30054: invalid upper limit snapshot expression<br \/>\n<\/span><\/p>\n<p style=\"text-align: justify; margin-left: 56pt\"><span style=\"font-size:9pt\"><span style=\"font-family:\ub3cb\uc6c0\">\uc774<\/span><span style=\"font-family:Courier\"> error<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ub294<\/span><span style=\"font-family:Courier\"> 4<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ubc88\uc9f8<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uc904\uc758<\/span><span style=\"font-family:Courier\"> to_timestamp(sysdate)<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uac00<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uc798\ubabb\ub418\uc5c8\ub2e4\ub294<\/span><span style=\"font-family:Courier\"> error<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ub85c<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ud604\uc7ac\uc758<\/span><span style=\"font-family:Courier\"> current_scn<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uc774<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ubbf8\ucc98<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ud604\uc7ac\uc2dc\uac04\uae4c\uc9c0<\/span><span style=\"font-family:Courier\"> update<\/span><span style=\"font-family:\ub3cb\uc6c0\">\ub418\uc9c0<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uc54a\uc558\uc74c\uc744<\/span><span style=\"font-family:Courier\"><br \/>\n\t\t\t<\/span><span style=\"font-family:\ub3cb\uc6c0\">\uc758\ubbf8\ud55c\ub2e4<\/span><span style=\"font-family:Courier\">.<br \/>\n<\/span><\/span><\/p>\n<p style=\"text-align: justify; margin-left: 56pt\"><span style=\"font-family:Courier; font-size:9pt\">\u00a0\u00a0\u00a0\u00a0<span style=\"color:blue\">ORA-30052: invalid lower limit snapshot expression<\/span><\/span>\n\t<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\ub610\ud55c minscn\ubcf4\ub2e4 \uc774\ub978 \uc2dc\uac04\uc744 \ub123\uc73c\uba74 \uc704\uc640 \uac19\uc740 error\uac00 \uc0dd\uae34\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\uc704\uc640 \uac19\uc740 \ub0b4\uc6a9\uc744 \uc815\ud655\ud788 \ucc98\ub9ac\ud558\uae30 \uc704\ud574\uc11c Oracle Database 10g\ubd80\ud130 \uc0c8\ub85c\uc6b4 pseudocolumn\uc774 \uc0dd\uacbc\ub2e4.\n<\/p>\n<ul style=\"margin-left: 84pt\">\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_STARTTIME<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_STARTSCN<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_ENDTIME<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_ENDSCN<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_XID<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">VERSIONS_OPERATION<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\ub610\ud55c scn\uacfc timestamp\uc758 \uad00\uacc4\ub97c \uc54c\uc544\ubcfc \uc218 \uc788\ub294 function \ub450 \uac00\uc9c0\uac00 \ucd94\uac00\ub418\uc5c8\ub2e4.\n<\/p>\n<ul style=\"margin-left: 84pt\">\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">SCN_TO_TIMESTAMP<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify\"><span style=\"color:blue\">TIMESTAMP_TO_SCN<\/span>\n\t\t\t<\/div>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\uc704\uc758 pseudocolumn\uc744 \uc774\uc6a9\ud558\uc5ec \ub2e4\uc2dc \uc815\ud655\ud788 query\ub97c \uc218\ud589\ud574 \ubcf4\uaca0\ub2e4.\n<\/p>\n<div style=\"margin-left: 56pt\">\n<table style=\"border-collapse:collapse\" border=\"0\">\n<colgroup>\n<col style=\"width:525px\"\/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt\">\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">update test_emp set sal =1600 where ename =&#8217;MILLER&#8217;;<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1 row updated.<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; COMMIT;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">Commit complete.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select <span style=\"color:blue\">versions_starttime, versions_endtime,<\/span> sal from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"background-color:#d9d9d9\">versions between scn minvalue and maxvalue<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  3  <span style=\"background-color:#d9d9d9\">where ename=&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">VERSIONS_STARTTIME             VERSIONS_ENDTIME                      SAL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">10-OCT-03 04.43.55 PM                                               1600<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">10-OCT-03 04.40.38 PM          10-OCT-03 04.43.55 PM                1500<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\"><span style=\"color:blue\">10-OCT-03 04.40.38 PM                1400<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select sal from test_emp<br \/>\n<\/span><\/span><\/p>\n<ol>\n<li><span style=\"color:blue; font-family:Courier; font-size:9pt; background-color:#d9d9d9\">versions between timestamp<br \/>\n<\/span><\/li>\n<li><span style=\"font-family:Courier; font-size:9pt; background-color:#d9d9d9\">to_timestamp(&#8216;2003-10-10 16:40:38&#8242;,&#8217;YYYY-MM-DD HH24:MI:SS&#8217;)<br \/>\n<\/span><\/li>\n<\/ol>\n<p><span style=\"font-family:Courier; font-size:9pt\">  4  <span style=\"background-color:#d9d9d9\">and to_timestamp(&#8216;2003-10-10 16:43:55&#8217;, &#8216;YYYY-MM-DD HH24:MI:SS&#8217;)<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  5  <span style=\"background-color:#d9d9d9\">where ename =&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">       SAL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      1500<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1400<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select <span style=\"color:blue\">scn_to_timestamp<\/span>(current_scn) from v$database;<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SCN_TO_TIMESTAMP(CURRENT_SCN)<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">10-OCT-03 04.50.51.000000000 PM<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt;  <span style=\"background-color:#d9d9d9\">select sal from test_emp<br \/>\n<\/span><\/span><\/p>\n<ol>\n<li><span style=\"color:blue; font-family:Courier; font-size:9pt; background-color:#d9d9d9\">versions between timestamp<br \/>\n<\/span><\/li>\n<li><span style=\"font-family:Courier; font-size:9pt; background-color:#d9d9d9\">to_timestamp(&#8216;2003-10-10 16:40:38&#8242;,&#8217;YYYY-MM-DD HH24:MI:SS&#8217;) and<br \/>\n<\/span><\/li>\n<li><span style=\"font-family:Courier; font-size:9pt; background-color:#d9d9d9\">to_timestamp(&#8216;2003-10-10 16:50:51&#8217;, &#8216;YYYY-MM-DD HH24:MI:SS&#8217;)<br \/>\n<\/span><\/li>\n<li><span style=\"font-family:Courier; font-size:9pt; background-color:#d9d9d9\">where ename =&#8217;MILLER&#8217;;<br \/>\n<\/span><\/li>\n<\/ol>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">       SAL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      1600<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      1500<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1400<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\"><br \/>\n\t\t\t\t\t\t\t<\/span>\u00a0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: justify; margin-left: 56pt\">\uc704\uc758 \ub0b4\uc6a9\uacfc \uac19\uc774 \ubcc0\uacbd\ub418\uae30 \uc804\uc758 \ub0b4\uc6a9\uc778 sal=1400\uc778 \uc815\ubcf4\ub294 VERSIONS_STARTTIME\uc740 \uc5c6\uace0 VERSIONS_ENDTIME\ub9cc\uc774 \uc788\ub2e4. \ub610\ud55c current_scn\uc5d0 \ub300\ud55c \uc815\ubcf4\uc5d0 \ub300\ud55c timestamp\ub97c \uc9c1\uc811 query\ud558\uc5ec \uc815\ubcf4\ub97c \ub123\uc73c\uba74 \ub9c8\uc9c0\ub9c9 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ubcfc \uc218 \uc788\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 50pt\">\n<h3>Flashback Transaction Query Test<br \/>\n<\/h3>\n<\/p>\n<p style=\"text-align: justify; margin-left: 60pt\">\n<h4>\ud14c\uc2a4\ud2b8 \uac1c\uc694<br \/>\n<\/h4>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\ube44\uad50\uc801 \uac04\ub2e8\ud55c Flashback Transaction Query test\ub97c \ud574\ubcf4\uaca0\ub2e4. \ud14c\uc2a4\ud2b8 \ud658\uacbd\uc740 Flashback Versions Query\uc640 \ucc28\uc774\uac00 \uc5c6\ub2e4.\n<\/p>\n<p style=\"text-align: justify; margin-left: 60pt\">\n<h4>\ud14c\uc2a4\ud2b8 \uc608\uc81c<br \/>\n<\/h4>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\n\u00a0<\/p>\n<div style=\"margin-left: 56pt\">\n<table style=\"border-collapse:collapse\" border=\"0\">\n<colgroup>\n<col style=\"width:525px\"\/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt\">\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select sal from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"background-color:#d9d9d9\">versions between scn minvalue and maxvalue<\/span><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  3  <span style=\"background-color:#d9d9d9\">where ename=&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">       SAL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">      1600<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">update test_emp set sal=1700<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"background-color:#d9d9d9\">where ename=&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1 row updated.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; commit;<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">Commit complete.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">update test_emp set sal=1800<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"background-color:#d9d9d9\">where ename =&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1 row updated.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; commit;<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">Commit complete.<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select <span style=\"color:blue\">versions_xid<\/span>, sal<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  2  <span style=\"background-color:#d9d9d9\">from test_emp<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  3  <span style=\"color:blue; background-color:#d9d9d9\">versions between scn minvalue and maxvalue<\/span><span style=\"background-color:#d9d9d9\"><br \/>\n\t\t\t\t\t\t\t\t<\/span><\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">  4  <span style=\"background-color:#d9d9d9\">where ename=&#8217;MILLER&#8217;;<br \/>\n<\/span><\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">VERSIONS_XID            SAL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">0006000F0000001B       1800<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">0005000F00000036       1700<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">1300<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p style=\"margin-left: 9pt\"><span style=\"font-family:Courier; font-size:9pt\">SQL&gt; <span style=\"background-color:#d9d9d9\">select operation, undo_sql, table_name from<br \/>\n<\/span><\/span><\/p>\n<ol>\n<li><span style=\"font-family:Courier; font-size:9pt\"><span style=\"color:blue; background-color:#d9d9d9\">flashback_transaction_query<\/span><span style=\"background-color:#d9d9d9\"> where xid=&#8217;0005000F00000036&#8242;;<br \/>\n<\/span><\/span><\/li>\n<\/ol>\n<p>\n\u00a0<\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">OPERATION<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">UNDO_SQL<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">TABLE_NAME<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">UPDATE<br \/>\n<\/span><\/p>\n<p><span style=\"color:blue; font-family:Courier; font-size:9pt\">update &#8220;SCOTT&#8221;.&#8221;EMP&#8221; set &#8220;SAL&#8221; = &#8216;1300&#8217; where ROWID = &#8216;AAAL+ZAAEAAAAAdAAN&#8217;;<br \/>\n<\/span><\/p>\n<p><span style=\"font-family:Courier; font-size:9pt\">EMP<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: justify; margin-left: 56pt\">\n\u00a0<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\n\u00a0<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\n\u00a0<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">\n\u00a0<\/p>\n<p style=\"text-align: justify\">\n<h2>\ud65c\uc6a9\uac00\uc774\ub4dc \ubc0f \uacb0\ub860<br \/>\n<\/h2>\n<\/p>\n<p style=\"text-align: justify; margin-left: 56pt\">Database\ub97c \uad00\ub9ac\ud558\ub294 DBA\ub294 \ud56d\uc0c1 \uc8fc\uc758\ub97c \uc694\ud558\uac8c \ub41c\ub2e4. \ud558\ub098\uc758 \uc2e4\uc218\uac00 \ub3cc\uc774\ud0ac \uc218 \uc5c6\ub294 \uc5c4\uccad\ub09c \uacb0\uacfc\ub97c \ucd08\ub798\ud560 \uc218 \uc788\uae30 \ub54c\ubb38\uc774\ub2e4. \ubb38\uc81c\ub294 DBA\ub294 \uc0ac\ub78c\uc774\uae30 \ub54c\ubb38\uc5d0 \uadf8\ub7ec\ud55c \uc2e4\uc218\ub97c \uc6d0\ucc9c\uc801\uc73c\ub85c \ubd09\uc1c4\ud560 \ubc29\ubc95\uc774 \uc5c6\ub2e4\ub294 \uac83\uc774\ub2e4. \ub530\ub77c\uc11c \ucc28\ud6c4\uc758 \uc120\ucc45\uc73c\ub85c Flashback Query\ub97c \uc774\uc6a9\ud560 \uc218 \uc788\ub2e4. \uc774\ubbf8 \uc77c\uc5b4\ub09c \uc608\uae30\uce58 \uc54a\uc740 \uc7a5\uc560\uc5d0 \ub300\ud574 \ub9ce\uc740 \ubd80\ubd84\uc744 Flashback Query\uac00 \ud574\uacb0\ud574 \uc904 \uc218 \uc788\ub2e4. \ub9ce\uc740  \uc591\uc758 log\ub4e4\uacfc \uc608\uae30\uce58 \uc54a\uc740 \uc7a5\uc560 \uc2dc \ud574\uacb0\ud560 \ubc29\ubc95 \ubc0f \ub300\ucc45\uc744 \ud6a8\uacfc\uc801\uc73c\ub85c \ub9cc\ub4e4\uc5b4 \ub193\uc558\ub2e4\uba74 Oracle\uc758 \uc0c8\ub85c\uc6b4, \uadf8\ub9ac\uace0 \ub354\uc6b1 \ud5a5\uc0c1\ub41c Flashback Query\ub97c \ud6a8\uacfc\uc801\uc73c\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle9i\uc758 Flashback Query\ub97c \ud655\uc7a5\ud55c \ub0b4\uc6a9\uc774 Flashback Versions Query\uc640 Flashback Transaction Query\uc774\ub2e4. Flashback Versions Query\ub294 Select\uc2dc versions between\uba85\ub839\uc744 \ub123\uc73c\uba74 \ud574\ub2f9 \uc815\ubcf4\uc758 history \uc815\ubcf4\uac00 \ub098\uc628\ub2e4. Flashback Versions Query\uc640 Flashback Transaction Query\ub294 undo tablespace\uc758 \uc815\ubcf4\ub97c \uc774\uc6a9\ud558\uae30 \ub54c\ubb38\uc5d0, flashback log\uc640\ub294 \uad00\ub828\uc774 \uc5c6\ub2e4. Flashback Versions Query Test \ud14c\uc2a4\ud2b8 \uac1c\uc694 Flashback Version Query\ub294 \ub450 \uac00\uc9c0\ub85c \ub098\ub25c\ub2e4. \ud558\ub098\ub294 System Change Number(SCN)\ub97c \uae30\uc900\uc73c\ub85c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[9],"tags":[279,280],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1601"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1601"}],"version-history":[{"count":1,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1601\/revisions"}],"predecessor-version":[{"id":1602,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1601\/revisions\/1602"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1601"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}