Launched my new personal site!
After many trials and errors of trying to find a good place for publishing by blog posts and other professional… Read More »Launched my new personal site!
After many trials and errors of trying to find a good place for publishing by blog posts and other professional… Read More »Launched my new personal site!
If, for whatever reason, the Windows Computer Name is changed after SQL Server is already installed, then @@SERVERNAME and the information in sys.servers would not automatically reflect the change… Read More »How to Update @@SERVERNAME to Actual Machine Name?
Imagine the following: You have a couple or more SQL Servers with some sort of High Availability solution between them (AlwaysOn Availability Groups, Database Mirroring,… Read More »Automatically Enable or Disable Jobs Based on HADR Role
Sometimes, when you have a table with an IDENTITY column, there could be scenarios in which weird “gaps” are created between different IDs. There can… Read More »Re-align Identity Last Value to Actual Max Value
Not Trusted Foreign Key Constraints are such for which integrity of the underlying data is not guaranteed. This most commonly happens when you perform Bulk Insert into a table that has a FK constraint, or when you disable a FK constraint.
Having not trusted foreign keys can be dangerous for data integrity, because it’s possible to have invalid data in your table (despite the existence of the foreign key).
Read More »Find and fix untrusted Foreign Keys in all databasesWhen administrating a SQL Server instance with multiple CPU cores and heavy workload, it’s common to see SQL Server creating and using execution plans with parallelism. The instance configuration “cost threshold for parallelism” is what determines for SQL Server the minimum sub-tree cost before it starts considering to create a parallelism plan. The default “out-of-the-box” value of this configuration is 5.
However, in some cases, we would want to increase the default configuration of “cost threshold for parallelism” to something higher than the Microsoft default of 5, thus decreasing the frequency in which SQL Server creates parallelism plans.
Read More »Planning to Increase Cost Threshold for Parallelism – Like a Smart Person!