关于序列的号码丢失
首先看一个例子,让我们对CACHE丢失有一个直观的了解:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create sequence seq_czw
2 start with 1
3 nomaxvalue
4 cache 200
5 /
Sequence created.
SQL> select seq_czw.nextval from dual;
NEXTVAL
----------
1
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1670221824 bytes
Fixed Size 2176328 bytes
Variable Size 1073744568 bytes
Database Buffers 587202560 bytes
Redo Buffers 7098368 bytes
Database mounted.
Database opened.
SQL> select seq_czw.nextval from dual;
NEXTVAL
----------
201
SQL> select seq_czw.nextval from dual;
NEXTVAL
----------
202
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。