ALTER INDEX with ENABLE fails with Incorrect syntax near ‘ENABLE’. To enable index after you disable it for a bulk load, you rebuild it instead.
AsGml: Export a Shape as Namespaced XML
AsGml exports geometry as XML in the GML namespace. Read a line’s coordinates with a qualified path and compare an unqualified path.
SQL SERVER – Difference Between Candidate Keys and Primary Key In Simple Words
The difference between candidate keys and primary key in simple words: any unique column can be a candidate key, but only one becomes the primary key.
SQL SERVER – Change Collation of Database Column – T-SQL Script – Consolidating Collations – Extention Script
Brian Cidern’s extension script for consolidating collations across a database, a big help when you face the annoying cannot resolve collation error.
Adding Business Hours to a Timestamp in T-SQL
Add business hours through a stored work calendar, skip closed dates and nights, and calculate ticket deadlines without a minute loop.
SQL SERVER – Recently Executed T-SQL Query
fn_get_sql() and DBCC INPUTBUFFER will be deprecated. Use sys.dm_exec_query_stats and sys.dm_exec_sql_text to see each recently executed T-SQL query.
SQL SERVER – Enable Automatic Statistic Update on Database
Automatic statistics updates respond to changing data and query needs. I inspect the setting and estimates before treating it as a tuning fix.







