Readers of my BULK INSERT post hit Msg 4864, Bulk load data conversion error, and Msg 4860. I show how to reproduce and fix these errors.
SQL SERVER – FIX – Error: One or more files do not match the primary file of the database
A reader moved and renamed database files and got error 5173: one or more files do not match the primary file of the database. I explain what went wrong.
SQL SERVER – FIX: ERROR : Msg 3023, Level 16, State 2 – Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized
Backup jobs failing with Msg 3023? Backup, file changes and encryption changes on a database must be serialized. I look at what caused it for one reader.
SQL SERVER – Fix – Error 5058, Level 16, State 1 – Option cannot be set in database
A DBA’s maintenance task kept failing with Error 5058, Option cannot be set in database. I tracked down why it happens and how to fix it.
SQL SERVER – Msg 1206, Level 18, State 118 – The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction
Msg 1206 says MS DTC has cancelled the distributed transaction. A user group member hit it over a linked server, and the real cause taught me something new.
SQL SERVER – How to Catch Errors While Inserting Values in Table
Want to catch errors while inserting values into a table? Use TRY…CATCH. This simple example captures the error number and message.
SQL SERVER – Fix Error 7202 Could not find server in sys.servers. Verify that the correct server name was specified
Error 7202 Could not find server in sys.servers shows up when you restore a database that uses a linked server. A quick linked server script fixes it.





