Database Solutions

How to Diagnose and Collect Health Information for Multiple Remote SQL Servers from a Central SQL Server

Collecting and analyzing health and event related information from SQL Servers is very important. This can be automated with this SQL script.  SQL server diagnosis: When it comes to SQL Server diagnosis, database administrator always uses dynamic management views to collect key information from SQL Server instances. The diagnosing task can be made easier with the less commonly used stored procedure called sys.sp_serverdiagnostics. The only drawback is, this stored procedure is available only...

Read more »

How to Restart Multiple Remote SQL Servers via a Script on Central SQL Server

In this article, we would learn how to set up a simple script from a Central SQL Server and allow it to restart other machines in a SQL Server environment. Restarting SQL servers: SQL Server patching might require server reboot either in the beginning or after the patching process. Though restarting a machine is not a big task, allowing a script to restart SQL Servers is a cool way to automate and save time. Points to remember: Before deploying the script, please make sure that the account...

Read more »

4 Workarounds when Unique Constraint Prevents You from Inserting a New Record in SQL Server

If you failed to insert a new record into a table because of the unique constraint, do not miss to read this article. It will help you to solve this problem. In this article, we will introduce 4 methods to solve the problem when you fail to insert a new record because it violates the unique constraint of the table in SQL Server. A Real Case: Now let’s see a real case. We have a database named “Product” and there is a table called “DataNumenProduct” in the database. There are two...

Read more »