-- Requires Oracle 18c or later
SELECT u.username,
u.created,
u.profile,
u.account_status,
COUNT(o.object_name) AS objcnt
FROM dba_users u,
dba_objects o
WHERE u.username = o.owner
GROUP BY u.username,
u.created,
u.profile,
u.account_status
ORDER BY u.username;
ALTER SESSION SET CURRENT_SCHEMA=MYSCHEMA
Note: You cannot use a bind variable in place of MYSCHEMAYou can query OBJ$ to get the TYPE# of an object. A table of the different types is provided below...
SELECT DISTINCT type#
FROM obj$
ORDER BY 1;