Rebuild msdb database on SQL server

I don’t do this a lot since most of the apps are now a days using Azure SQL using all the benefits it offers. So I thought it would be better to take note of all the steps done for this. If the msdb database is damaged and you do not have a backup of the msdb database (for whatsoever reasons), you can create a new msdb by using the instmsdb script. In this blog post, we’ll go through steps required for the same.

Rebuilding the msdb database using the instmsdb script will eliminate all the information stored in msdb such as jobs, alert, operators, maintenance plans, backup history, Policy-Based Management settings, Database Mail, Performance Data Warehouse, etc.

Continue reading “Rebuild msdb database on SQL server”

Error: IIS Website not listening on

We had this situation other day with one of the IIS websites. We were troubleshooting SSL on the site, and after that we were able to resolve that SSL issue. However, we found that the site only works from within the server. But from outside, we were getting connection refused. We checked and re-checked certificates, certificate trust store, windows firewall rules, event logs and firewall logs, SNI, bindings but still same issue.

While checking ports, we observed that port 443 is in listening state only for IP address but not for (Note that means all possible IP address,  only ipv4). So it would require to be listening on the same, so that clients can connect to it. Continue reading “Error: IIS Website not listening on”

PowerShell OS Support Matrix

This post comes as courtesy of Chrissy LeMaire and Carlos Perez. PowerShell is already shipped with Windows Operating System. Since it was released 10 years ago, different versions of PowerShell have been shipped through different versions of Windows. You could also upgrade to another version by installing Windows Management Framework. It would be quite useful to know what version of PowerShell is shipped with what version of Windows and up to what you can upgrade to get most out of it.

Carlos Perez was able to spend some of him time and put together a nice matrix about it, which you can see below: Continue reading “PowerShell OS Support Matrix”

SQL Error : Index was outside the bounds of the Array (Microsoft.SqlServer.smo)

If while working on Azure SQL PaaS or even on-premise SQL database, you are stuck with this error “Index was outside the bounds of the Array. (Microsoft.SqlServer.smo)”, the most likely reason is that the version of SQL server management studio on your local machine is on the lower version that the SQL server version on the server end.

In such a scenario, you would need to upgrade the SSMS version installed on your local machine. Apparently, the reason behind the error message is that SQL couldn’t show new features in your old SSMS version. Continue reading “SQL Error : Index was outside the bounds of the Array (Microsoft.SqlServer.smo)”