oracle的SCN增长间隔时间
2012-07-25 19:53
141 查看
·查看数据库版本
·SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE11.2.0.1.0Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
·查看当前scn,如下:
·SQL>select dbms_flashback.get_system_change_number from dual
GET_SYSTEM_CHANGE_NUMBER
------------------------
1155901
·SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1155934
·采用scn_to_timestamp获取scn与时间的对应关系如下:
·SQL> select scn_to_timestamp(&scn) from dual;
Enter value for scn: 1155901
old1: select scn_to_timestamp(&scn) from dual
new1: select scn_to_timestamp(1155901) from dual
SCN_TO_TIMESTAMP(1155901)
---------------------------------------------------------------------------
05-APR-12 01.20.41.000000000 AM
SQL> /
Enter value for scn: 1155902
old1: select scn_to_timestamp(&scn) from dual
new1: select scn_to_timestamp(1155902) from dual
SCN_TO_TIMESTAMP(1155902)
---------------------------------------------------------------------------
05-APR-12 01.20.44.000000000 AM
SQL> select scn_to_timestamp(1155901) from dual;
SCN_TO_TIMESTAMP(2608762)
---------------------------------------------------------------------------
05-APR-12 01.20.41.000000000 AM
·scn_to_timestamp以及timestamp_to_scn的相互转化:
SQL> select timestamp_to_scn(to_timestamp('05-4月 -12 01.20.41.000000000 上午'))from dual;
select timestamp_to_scn(to_timestamp('05-4月 -12 01.20.41.000000000 上午')) from
dual
*
ERROR at line 1:
ORA-01843: not a valid month
·SQL> select timestamp_to_scn(to_timestamp('05-APR-12 01.20.41.000000000 AM')) from dual;
TIMESTAMP_TO_SCN(TO_TIMESTAMP('05-APR-12 01.20.41.000000000 AM'))
---------------------------------------------------------------
1155901
·SQL> select timestamp_to_scn(to_timestamp('05-04-12 01.20.41.000000000 AM')) from dual;
TIMESTAMP_TO_SCN(TO_TIMESTAMP('05-04-12 01.20.41.000000000 AM'))
---------------------------------------------------------------
1155901
·SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE11.2.0.1.0Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
·查看当前scn,如下:
·SQL>select dbms_flashback.get_system_change_number from dual
GET_SYSTEM_CHANGE_NUMBER
------------------------
1155901
·SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1155934
·采用scn_to_timestamp获取scn与时间的对应关系如下:
·SQL> select scn_to_timestamp(&scn) from dual;
Enter value for scn: 1155901
old1: select scn_to_timestamp(&scn) from dual
new1: select scn_to_timestamp(1155901) from dual
SCN_TO_TIMESTAMP(1155901)
---------------------------------------------------------------------------
05-APR-12 01.20.41.000000000 AM
SQL> /
Enter value for scn: 1155902
old1: select scn_to_timestamp(&scn) from dual
new1: select scn_to_timestamp(1155902) from dual
SCN_TO_TIMESTAMP(1155902)
---------------------------------------------------------------------------
05-APR-12 01.20.44.000000000 AM
SQL> select scn_to_timestamp(1155901) from dual;
SCN_TO_TIMESTAMP(2608762)
---------------------------------------------------------------------------
05-APR-12 01.20.41.000000000 AM
·scn_to_timestamp以及timestamp_to_scn的相互转化:
SQL> select timestamp_to_scn(to_timestamp('05-4月 -12 01.20.41.000000000 上午'))from dual;
select timestamp_to_scn(to_timestamp('05-4月 -12 01.20.41.000000000 上午')) from
dual
*
ERROR at line 1:
ORA-01843: not a valid month
·SQL> select timestamp_to_scn(to_timestamp('05-APR-12 01.20.41.000000000 AM')) from dual;
TIMESTAMP_TO_SCN(TO_TIMESTAMP('05-APR-12 01.20.41.000000000 AM'))
---------------------------------------------------------------
1155901
·SQL> select timestamp_to_scn(to_timestamp('05-04-12 01.20.41.000000000 AM')) from dual;
TIMESTAMP_TO_SCN(TO_TIMESTAMP('05-04-12 01.20.41.000000000 AM'))
---------------------------------------------------------------
1155901
相关文章推荐
- Oracle Job 语法和时间间隔的设定
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究
- Oracle Job 语法和时间间隔的设定
- Oracle 两个日期之间的时间间隔
- 判断Oracle的两个Undo日志之间的时间间隔
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究
- oracle job的建立时间间隔
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究
- Oracle Job 语法和时间间隔的设定
- oracle 时间和SCN相互转化
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究
- (笔记))oracle SCN 异常增长问题 以及 ORA-19706
- Oracle JOB 间隔时间详解
- oracle精确计算出两个时间的间隔
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究
- Oracle job定时器的执行时间间隔学习汇总
- Oracle 中统计时间间隔的方法
- ORACLE 计算时间相减间隔
- ORACLE 计算时间相减间隔
- Oracle DB 服务器 系统时间修改问题 与 SCN 关系的深入研究