List of Tables.

Speed

Member²
I am using the following SQL code to retrieve a list of tables:

SELECT object_name
FROM user_objects
WHERE object_type = 'TABLE'
ORDER BY object_name

We are using multiple environments (Development, Test and Production). This works fine in one of our environments (Development) but returns nothing in the others. What type of access do I need for this code to work?

Regards,

Steve
 
Do you get an ORA-00942 exception (table or view does not exist)? If so, the Oracle user needs select prvileges on the sys.user_objects view, or the public synonym user_objects is missing.

If no exception is raised and the result set is empty, then the currently connected user does not own any tables.
 
Back
Top