01
問題及現(xiàn)象描述
CREATE SEQUENCE MYTEST.S_TEST
START
WITH 1
INCREMENT
BY 1
NOMINVALUE
MAXVALUE
10000
NOCYCLE
CACHE 20
NOORDER
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
1
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
2
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
3
SQL> ALTER SYSTEM FLUSH SHARED_POOL;
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
21
02
如何解決
SQL> desc dbms_shared_pool;
ERROR:
ORA-04043: 對(duì)象 dbms_shared_pool 不存在
SQL> @E:oracleRDBMSADMINdbmspool.sql
SQL> desc dbms_shared_pool;
SQL> grant execute on dbms_shared_pool to MYtest;
SQL> create synonym MYtest.dbms_shared_pool for dbms_shared_pool;
procedure keep(name varchar2, flag char DEFAULT P)
name
-- The name of the object to keep. There are two
kinds of objects:
-- PL/SQL objects, triggers, sequences, types and
Java objects,
-- which are specified by name, and
-- SQL cursor objects which are specified by a two-part number
-- (indicating a location in the shared pool). For
example:
-- dbms_shared_pool.keep(scott.hispackage)
-- will keep package HISPACKAGE, owned by SCOTT. The
names for
-- PL/SQL objects follows SQL rules for naming objects (i.e.,
-- delimited identifiers, multi-byte names, etc. are allowed).
-- A cursor can be keeped by
-- dbms_shared_pool.keep(0034CDFF, 20348871, C)
-- The complete hexadecimal address must be in the first 8
characters.
-- The value for this identifier is the concatenation of the
-- address and hash_value columns from the v$sqlarea
view. This
-- is displayed by the sizes call above.
-- Currently TABLE and VIEW objects may not be keeped.
flag
-- This is an optional parameter. If the parameter
is not specified,
-- the package assumes that the first parameter is the name of a
-- package/procedure/function and will resolve the
name. Otherwise,
-- the parameter is a character string indicating what kind of
object
-- to keep the name identifies. The string is case
insensitive.
-- The possible values and the kinds of objects they indicate are
-- given in the following table:
-- Value Kind of Object to keep
-- ----- ----------------------
-- P package/procedure/function
-- Q sequence
-- R trigger
-- T type
-- JS java source
-- JC java class
-- JR java resource
-- JD java shared data
-- C cursor
安裝成功后,執(zhí)行exec dbms_shared_pool.keep(數(shù)據(jù)庫用戶名.sequence名稱, Q);執(zhí)行成功即可;
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
24
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
25
SQL> select S_TEST2.nextval from dual;
NEXTVAL
----------
1
SQL> exec dbms_shared_pool.keep(s_test,q);
SQL> select S_TEST2.nextval from dual;
NEXTVAL
----------
21
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
26
SQL> exec
dbms_shared_pool.unkeep(s_test,q);
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
27
SQL> alter system flush shared_pool;
SQL> select S_TEST.nextval from dual;
NEXTVAL
----------
41
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/129714.html
摘要:一般印象,項(xiàng)目適合做一些短小精悍的項(xiàng)目,特別是與等數(shù)據(jù)庫結(jié)合很是般配。生成報(bào)表,不同的查詢結(jié)果生成不同的報(bào)表。配置從下載客戶端,然后解壓后放入自己指定的目錄。指定數(shù)據(jù)庫連接池的超時(shí)時(shí)間。 一般印象,flask 項(xiàng)目適合做一些短小精悍的項(xiàng)目,特別是與 sqlite、mysql 等數(shù)據(jù)庫結(jié)合很是般配。但是在一些大公司,特別是一些金融行業(yè)等國(guó)企公司,還是以 oracle 居多,那么,這個(gè)小辣...
摘要:既然行不通,或許可以考慮使用注解來自定義一個(gè)實(shí)現(xiàn)。仍舊提供給了使用者原始的使用方式利用來構(gòu)造并執(zhí)行。就像一樣,使用者也可以自定義來執(zhí)行,試試看,同樣沒有問題,再多的數(shù)據(jù)也可以被保存到數(shù)據(jù)庫中批量保存的效果達(dá)到了。 更多精彩博文,歡迎訪問我的個(gè)人博客 說明 SpringBoot版本:2.1.4.RELEASE java版本:1.8 文中所說JPA皆指spring-boot-starte...
摘要:關(guān)于我為什么寫這篇文章是因?yàn)榻裉煸谧鲇唵文K的時(shí)候看到之前的上描述的年月日用戶位企業(yè)位四位自增長(zhǎng)數(shù)。背景對(duì)于其定訂單的生成。個(gè)人的看法是主要是唯一,其他關(guān)于業(yè)務(wù)方面的不是太太重要。自增實(shí)現(xiàn)了用于將的值遞增,并返回結(jié)果。 關(guān)于我為什么寫這篇文章是因?yàn)榻裉煸谧鲇唵文K的時(shí)候,看到之前的PRD上描述的年月日+用戶id2位+企業(yè)id位+四位自增長(zhǎng)數(shù)。然后竟被我反駁的突然改成了精確時(shí)間+4位自增...
摘要:結(jié)合對(duì)做如下調(diào)整的毫秒時(shí)間戳的數(shù)據(jù)邏輯分區(qū)以及的自增序列。為了解決這個(gè)問題,便引入了邏輯分區(qū)。參考文章批量插入返回自增的問題美團(tuán)點(diǎn)評(píng)分布式生成系統(tǒng) 這里的博客版本都不會(huì)被更新維護(hù)。查看最新的版本請(qǐng)移步:http://neojos.com 全稱Universally Unique Identifier,UUID占128bit,也就是16個(gè)英文字符的長(zhǎng)度(16byte),需要強(qiáng)調(diào)的是,它...
閱讀 1356·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3671·2023-01-11 13:20