--(' table ', ' line ', ' ods_xx ') all the tables and users in this case need to be capitalized.
If the table name user name is not written, the error is reported: the object "EMP" is of type table, not found in the scheme "Scott"
Pro-Test code:
Set long 90000;
Set Linesize 4000;
Set pagesize 4000;
Spool Table.sql
Select Dbms_metadata.get_ddl (' TABLE ', ' line ', ' ods_xx ') from dual;
Spool off
1, once want to query the table additional log: dbms_metadata.get_ddl (' table ', ' name ', ' User name ') from dual; 2, the error is as follows: ora-31603: Object "table name" belongs to type table, not found in scenario "user name" 3, Reason: The user is missing the query permission of the related data dictionary view. 4, the solution: Grant Select_catalog_role to the user name; Note: Authorization of Select any dictionary permission is still error. 5. Summary: Select any dictionary and select_catalog_role
In the same place: With one of these two, you can basically query the data dictionary
the Difference: 1) Select any dictionary is a system privilege, and Select_catalog_role is a role. 2) The role needs to be re-logged or explicit set role to take effect, and the system permission is immediately effective. (P.S. The same revoke permission is immediately effective) 3) Select_catalog_role can view some data dictionary views · (You can see the definition of role), such as Dba_, and select any dictionary can view the SYS table, select_catalog_role not see.
For a table statement DLL that exports Oracle multiple tables, generates an. SQL statement.