ORA-31600: invalid input value INDEX PARTITION for parameter
執行備份資料庫物件的儲存過程報如下錯誤
SQL> exec proc_auto_backup;
begin proc_auto_backup; end;
ORA-31600: invalid input value INDEX PARTITION for parameter OBJECT_TYPE in function GET_DDL
ORA-06512: at "SYS.DBMS_METADATA", line 3773
ORA-06512: at "SYS.DBMS_METADATA", line 3828
ORA-06512: at "SYS.DBMS_METADATA", line 5678
ORA-06512: at line 1
ORA-06512: at "E_BACKUP.PROC_AUTO_BACKUP", line 134
ORA-06512: at line 2
我猜測是儲存過程如下程式碼所呼叫的物件值是一個分開的字串,而非一個連體字元
select dbms_lob.substr(dbms_metadata.get_ddl(v_object_type,v_tname,'E_CHANNEL')) into v_text from dual;
SQL> create table t_proc(a varchar2(100));
Table created
SQL> insert into t_proc values('str');
1 row inserted
SQL> commit;
Commit complete
SQL> create or replace procedure proc_sep(v_in in varchar2)
2 as
3 v_cnt pls_integer;
4 begin
5 select strcount(1) into v_cnt from t_proc where a=v_in;
6 dbms_output.put_line(v_cnt);
7 end;
8 /
Procedure created
SQL> set serverout on
--呼叫連體字元正常
SQL> exec proc_sep('str');
1
PL/SQL procedure successfully completed
SQL> truncate table t_proc;
Table truncated
SQL> select * from t_proc;
A
--------------------------------------------------------------------------------
SQL> insert into t_proc values('a b');
1 row inserted
SQL> commit;
Commit complete
SQL> select * from t_proc;
A
--------------------------------------------------------------------------------
a b
--呼叫非連體字元亦正常
SQL> exec proc_sep('a b');
1
PL/SQL procedure successfully completed
SQL> create materialized view mv_proc_sep
2 refresh complete
3 as
4 select a
5 from t_proc
6 /
Materialized view created
SQL>
SQL> select object_name,object_type from user_objects where object_name='MV_PROC_SEP';
OBJECT_NAME OBJECT_TYPE
-------------------------------------------------------------------------------- -------------------
MV_PROC_SEP TABLE
MV_PROC_SEP MATERIALIZED VIEW
SQL> select dbms_metadata.get_ddl('MATERIALIZED VIEW','MV_PROC_SEP','SCOTT') from dual;
select dbms_metadata.get_ddl('MATERIALIZED VIEW','MV_PROC_SEP','SCOTT') from dual
ORA-31600: invalid input value MATERIALIZED VIEW for parameter OBJECT_TYPE in function GET_DDL
ORA-06512: at "SYS.DBMS_METADATA", line 3773
ORA-06512: at "SYS.DBMS_METADATA", line 3828
ORA-06512: at "SYS.DBMS_METADATA", line 5678
ORA-06512: at line 1
--查閱官方手冊,物件型別引數的值為:MATERIALIZED_VIEW,非自user_objects查下的值
SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW','MV_PROC_SEP','SCOTT') from dual;
DBMS_METADATA.GET_DDL('MATERIA
--------------------------------------------------------------------------------
CREATE MATERIALIZED VIEW "SCOTT"."MV_PROC_SEP" ("A")
ORGANIZATION HEAP PC
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-754988/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- partition table and partition indexIndex
- skip_unusable_index parameterIndex
- 使用DBMS_UTILITY.get_parameter_value檢視session的parameterSession
- python: invalid value encountered in divide以及invalid value encountered in double_scalars報錯PythonIDE
- mybatis竟然報"Invalid value for getInt()"MyBatis
- oracle分割槽partition及分割槽索引partition index(一)Oracle索引Index
- attempt to index local ‘result‘ (a nil value)Index
- partition_global index補疑(一)Index
- input實時監聽value change
- The value (30) of MAXTRANS parameter ignored. 問題分析
- 矽基流動 The parameter is invalid. Please check againAI
- Elasticsearch 6 建立索引報錯 invalid_index_name_exception Invalid index name [testDemo], must be lowercaseElasticsearch索引IndexException
- Parameter index out of range (3 > number of parameters, which is 2).Index
- 那上邊的到底是 global index還是partition indexIndex
- java.sql.SQLException: No value specified for parameter 1 異常分析JavaSQLException
- oracle分割槽及分割槽索引partition_partition index_維護(一)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(二)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(三)Oracle索引Index
- oracle分割槽及分割槽索引partition_partition index_維護(四)Oracle索引Index
- use the function_based index to access the null valueFunctionIndexNull
- mybatis Parameter index out of range (1 > number of parameters, which is 0)MyBatisIndex
- ERROR ITMS-90542: “Invalid CFBundleSupportedPlatforms value.”ErrorPlatform
- selenium 如何清除 input 框中的 value 值?
- oracle分割槽及分割槽索引partition_partition index_維護(五)_快捷方法Oracle索引Index
- ORA-29707: inconsistent value 2 for initialization parameter cluster_database_Database
- ORA-00119: invalid specification for system parameter REMOTE_LISTENERREM
- ICA Client Error 1043: Invalid Parameter with a Towitoko CHIPDRIVE SIM Card ReaderclientError
- The value for the useBean class attribute SecurityOrgPages is invalid. in tomcat 5.5BeanTomcat
- jquery獲取同一name的input的value值jQuery
- ORA-20000: index "xxxx" or partition of such index is in unusable stateIndex
- 分割槽索引(Partition Index)與SQL執行計劃(中)索引IndexSQL
- 分割槽索引(Partition Index)與SQL執行計劃(下)索引IndexSQL
- 分割槽索引(Partition Index)與SQL執行計劃(上)索引IndexSQL
- `jsonb` 報錯 `invalid input syntax for type timestamp with time zone ““JSON
- 實時監聽input輸入框value的變化:
- [LeetCode] 2903. Find Indices With Index and Value Difference ILeetCodeIndex
- ORA-32021: parameter value longer than 255 characters 解決方法
- An invalid XML character (Unicode: 0x10) was found in the value of attributeXMLUnicode