19 May, 2015

List the count of Objects schema wise in Oracle

select owner,
max( decode( object_type, 'TABLE', cnt, null ) ) Tables,
max( decode( object_type, 'VIEW', cnt, null ) ) Views,
max( decode( object_type, 'TRIGGER', cnt, null ) ) triggers,
max( decode( object_type, 'PACKAGE', cnt, null ) ) packages
from ( select owner, object_type, count(*) cnt
from dba_objects
group by owner, object_type )
group by owner
/

No comments:

Post a Comment

OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...