Hi @C, Manoharan (Cognizant)
Try this:
EXEC sp_MSforeachdb '
USE [?];
SELECT
DB_NAME() AS DatabaseName,
s.name AS SchemaName,
o.type_desc AS ObjectType,
o.name AS ObjectName
FROM
sys.objects o
INNER JOIN sys.schemas s ON o.schema_id = s.schema_id
ORDER BY
SchemaName,
ObjectType,
ObjectName;
';
Best regards,
Cosmog
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".