批量修改sequence cache
Posted 特立独行
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了批量修改sequence cache相关的知识,希望对你有一定的参考价值。
-- 批量修改sequence cache
SELECT \'alter sequence \' || SEQUENCE_OWNER || \'.\' || SEQUENCE_NAME || \' cache 1000;\' INC_SEQ_CMD
FROM DBA_SEQUENCES
WHERE LAST_NUMBER > 100000
AND CACHE_SIZE < 200
AND SEQUENCE_OWNER IN
(SELECT USERNAME
FROM DBA_USERS
WHERE ACCOUNT_STATUS = \'OPEN\'
AND USERNAME NOT IN
(\'SYS\', \'SYSTEM\', \'ZABBIX\', \'DBSNMP\', \'MGMT_VIEW\', \'SYSMAN\'))
AND EXISTS (SELECT 1
FROM V$DATABASE
WHERE OPEN_MODE = \'READ WRITE\'
AND DATABASE_ROLE = \'PRIMARY\');
以上是关于批量修改sequence cache的主要内容,如果未能解决你的问题,请参考以下文章