建立cache group 時遇到 錯誤5120 時候的解決方案
5120 錯誤大致是由於oracle 上的表主鍵或其它關鍵約束處於NOVALIDATE 狀態導致的。
所以你可以通過如下查詢找到表所對應索引的狀態:
SQL> select constraint_name, constraint_type, validated, status from
all_constraints where table_name = 'MyTable';
CONSTRAINT_NAME C VALIDATED STATUS
------------------------------ - ------------- --------
REFID_CONSTRAINT C VALIDATED ENABLED
PKEY_CONSTRAINT P NOT VALIDATED DISABLED
然後使之生效:
SQL> alter table MyTable modify constraint PKEY_CONSTRAINT validate;
--------------官方文件中是這樣描述的:
Declaring NOVALIDATE on constraints causes cache group creation failure
If the Oracle database table on which you want to create the cache group declares NOVALIDATE on columns with primary key, UNIQUE or NOT NULL constraints, the creation of the cache group fails.
Note:
This does not apply to any foreign key constraints. However, TimesTen recommends that any matching foreign key is in the enabled VALIDATE state. Your workload performance may be affected when you alter a foreign key column to the enabled VALIDATE state.
TimesTen perceives a NOVALIDATE on a primary key or NOT NULL table column definition as a NULL and, therefore, not qualified as a column on which to build the cache group. Thus, all columns with the primary key, UNIQUE and NOT NULL column constraints must be
enabled with the VALIDATE state when creating a cache group from the Oracle database table.
When you create a cache group from an Oracle database table with one or more of these constraints, the following errors are thrown:
5124: Autorefresh/propagate are not allowed on restricted cache group
5168: Restricted cache groups are deprecated
5120: No matching unique index with not null columns, unique key constraint
with not null columns, or primary key constraint on table EVENTLOG, cache
operations are restricted.
If you receive these errors, you can perform a SELECT statement to verify any existing NOVALIDATE constraints on the Oracle database table. The following SELECT statement shows all constraints on the MyTable table:
SQL> select constraint_name, constraint_type, validated, status from
all_constraints where table_name = 'MyTable';
CONSTRAINT_NAME C VALIDATED STATUS
------------------------------ - ------------- --------
REFID_CONSTRAINT C VALIDATED ENABLED
PKEY_CONSTRAINT P NOT VALIDATED DISABLED
If the table column that is to be the primary key for the cache table is enabled as NOVALIDATE, perform the following steps to enable the column with the VALIDATE state:
Enable the NOVALIDATE state for the primary key column.
SQL> alter table MyTable modify constraint PKEY_CONSTRAINT
enable novalidate;
Table altered.
SQL> select constraint_name, constraint_type, validated, status
from all_constraints where table_name = 'MyTable';
CONSTRAINT_NAME C VALIDATED STATUS
------------------------------ - ------------- --------
REFID_CONSTRAINT C VALIDATED ENABLED
PKEY_CONSTRAINT P NOT VALIDATED ENABLED
Enable the VALIDATE state for the primary key column.
SQL> alter table MyTable modify constraint PKEY_CONSTRAINT validate;
Table altered.
SQL> select constraint_name, constraint_type, validated, status
from all_constraints where table_name = 'MyTable';
CONSTRAINT_NAME C VALIDATED STATUS
------------------------------ - ------------- --------
REFID_CONSTRAINT C VALIDATED ENABLED
PKEY_CONSTRAINT P VALIDATED ENABLED
相關文章
- 工程make時出現"時鐘錯誤的問題"的解決方案
- ant構建時出現錯誤解決方案
- SVN 遇到的一些錯誤解決方案
- 安裝clusterware時候遇到版本不相容錯誤
- 啟動10.2.0.5的OEM時,遇到ssl: Open wallet failed, ret = 28750的錯誤解決方案AI
- 解決升級資料庫時遇到的Text file busy錯誤資料庫
- mysql 禁用 ONLY_FULL_GROUP_BY,暫時解決錯誤(sql_mode=only_full_group_by)MySql
- 訪問 HTTPS 網站時的 SSL 錯誤解決方案HTTP網站
- Spring Boot建立DataSource時遇到的錯誤:No supported DataSource type foundSpring Boot
- 使用React Hooks時遇到的錯誤提示ReactHook
- 使用flashback database 特性時遇到的錯誤Database
- 解決vue使用Sass時候的報錯問題Vue
- scp時候出現ssh Connection refused的解決方案
- 【git】Git commit時提示錯誤時 解決辦法GitMIT
- firefox下XMLHttpRequest重用時nsIXMLHttpRequest.send發生錯誤的解決方案FirefoxXMLHTTP
- Go構建遇到cgo動態庫時解決方案Go
- ORACLE11g DataGuard手工建立錯誤的解決方案(一)Oracle
- ORACLE11g DataGuard手工建立錯誤的解決方案(二)Oracle
- vmware server啟動時503錯誤解決Server
- 啟動idea時, 碰到"failed to load jvm DLL ..."錯誤 解決方案IdeaAIJVM
- Windows下使用python庫 curses遇到錯誤訊息的解決方案WindowsPython
- 以只讀模式開啟物理備庫的時候,遇到ORA-16006錯誤模式
- 建立結算清單時提示衝突解決方案
- Win7撥號連線時出現錯誤711的解決方案Win7
- 真機除錯時遇到“Couldnotlaunch***processlaunchfailed:Security”的解決辦法除錯AI
- 誰遇到過執行 monkey 的時候報 filenotfound 的報錯
- windows上使用telnet時遇到的兩個錯誤Windows
- latex 錯誤以及解決方案
- pypy有時候執行python程式錯誤Python
- MySQL錯誤-this is incompatible with sql_mode=only_full_group_by完美解決方案MySql
- iOS路上遇到的錯誤及解決辦法iOS
- unity player 顯示播放錯誤時的解決辦法Unity
- CATIA許可證時間錯誤的解決辦法
- oracle 繁忙時候建立索引Oracle索引
- 解決 Angular 官網下載的庫 Schematics 執行 npm run build 時遇到的編譯錯誤AngularNPMUI編譯
- session是什麼時候建立的Session
- 訪問 SAP 電商雲 Storefront 時遇到的 HTTP 403 錯誤HTTP
- 如何處理CloudFoundry應用部署時遇到的254錯誤Cloud