In the previous chapter, you learned how to find all of the SQL Server Instances on your network. Now, it’s time to gather essential information about each of those servers and then use that information to create an inventory of this information.
Creating inventories lets you provide access to reports for members of the organization without having to grant access to your SQL instances. Keeping your inventory up to date will help to speed up the planning of migrations & upgrades in particular, as knowing what features are in-use can keep upgrades properly planned and on track.
DBAs are often expected to just know the configuration of every host, instance and database in their estate. With a handful of instances this may be possible but for hundreds or thousands it is unlikely.
In this chapter, we will show you how to use dbatools to build an inventory of the the things we’re often expected to know, such as:
- Feature usage
- Build info
- Host (server) info
- Databases
- Jobs
- Application logins
- Disk space trends
- Instance configuration (is xp_cmdshell enabled?)
- Port Configuration
- Edition
- Installation Date
- Last Check Database Integrity Check
- DBCC / Suspect Pages
- Last Backup Date
- Centralized Error Messages
Armed with this information, you will be able to answer ad-hoc questions about a host, an instance or a database. Combine this knowledge with the skills you learned in Chapters 5 and 6, and you will be able to document your entire estate into a SQL database.