ps1 cannot be loaded because the execution of scripts is disabled on this system Powershell Error

There are many cases, when we get an error “ps1 cannot be loaded because the execution of scripts is disabled on this system” while executing any script in Windows Powershell. It is well understood that the execution policy helps to protect you from scripts that you do not trust. Changing…

Read More

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: SELECT type, total_count = COUNT(*), last_crdate = MAX(crdate), last_refdate = MAX(refdate) FROM ( SELECT type = CASE WHEN xtype = ‘U’ THEN ‘table’ WHEN xtype = ‘V’ THEN ‘view’ WHEN xtype = ‘P’ THEN ‘proc’ WHEN…

Read More