How to Count total number of objects in SQL Server instance




Below query will help you find the list of object counts in the database:

total_count = COUNT(*),
last_crdate = MAX(crdate),
last_refdate = MAX(refdate)
type = CASE
WHEN xtype = ‘U’ THEN ‘table’
WHEN xtype = ‘V’ THEN ‘view’
WHEN xtype = ‘P’ THEN ‘proc’
WHEN xtype IN (‘FN’, ‘TF’, ‘IF’) THEN ‘fuction’
FROM sysobjects
WHERE xtype IN (‘FN’, ‘TF’, ‘IF’, ‘P’, ‘U’, ‘V’)
) s

Be Connected…




THREE QUERIES offers easy access to information about SharePoint and associated technologies, project management, agile and scrum methodologies that helps developers, administrators, architects, technical managers, business analysts and end users. It has grown from there. We provide an important knowledge base for those involved in managing, architecture and developing software projects of all kinds. With weekly/daily exclusive updates, we keep you in touch with the latest business, management, technology thinking.

WE ARE CONNECTED ~ Follow us on social media to get regular updates and opinion on what's happening in the world of SharePoint, front-end, back end web technologies and project management. If you like this article, please share it and follow us at Facebook, Twitter, Instagram and LinkedIn

About Satyendra Mishra

Microsoft certified, motivated, energetic and accomplished SharePoint Consultant and Architect with 13+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. He has been fortunate to be a part of over 20+ Web/Mobile/Software SharePoint and .Net projects delivery with various companies across different industry sectors. This has provided him a valuable insight and experience especially in successful implementation of technology solutions. Having very strong System Architecture, Technological, Management & Analytical Skills, Knowledge of Office 365, SharePoint, .Net, JavaScript, React, Angular, Azure, SQL. In 2016, he decided to start sharing the knowledge back to society in the form for content writing and blogging.
View all posts by Satyendra Mishra →

Leave a Reply

Your email address will not be published. Required fields are marked *