Useful Undocumented SQL Server 2016 Stored Procedures (Part 1) SQL Server 2016 supports the following useful undocumented stored procedures: sp_MSforeachdb sp_MSforeachtable sp_MSindexspace sp_MStablespace sp_readerrorlog sp_MSforeachdb The sp_MSforeachdb database engine stored procedure is used to perform the same actions for all databases. Sometimes, you need to perform the same actions for all databases. You can create cursor for this purpose, or…