ORA-31603: object "orders" of type TABLE 的解决方法

问题:

SQL> select dbms_metadata.get_ddl(‘TABLE’,’orders’) from dual;
ERROR:
ORA-31603: object “orders” of type TABLE not found in schema “SYSTEM”
ORA-06512: at “SYS.DBMS_METADATA”, line 1546
ORA-06512: at “SYS.DBMS_METADATA”, line 1583
ORA-06512: at “SYS.DBMS_METADATA”, line 1901
ORA-06512: at “SYS.DBMS_METADATA”, line 2792
ORA-06512: at “SYS.DBMS_METADATA”, line 4333
ORA-06512: at line 1

解决:

dbms_metadata.get_ddl()参数都大写;

信息显示不全,set long 999 完全显示。

解决方法

sqlplus xxx/xxx<set linesize 180    
set head off
SET SERVEROUTPUT ON
SET LINESIZE 1000
SET FEEDBACK OFF
set long 999999     
SET PAGESIZE 1000   
EXECUTE DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE',false);
SELECT DBMS_METADATA.GET_DDL('TABLE','xxxxx') FROM DUAL;

ORA-31603: object

你可能感兴趣的:(oracle)