Currently Browsing: T-SQL

SQL Server / Monitor Backup and Restore progress

SQL Server / Monitor Backup and Restore progress
Recently I had a situation on QA environment where Backup and Restore took a long time to finish. It was HA environment with two nodes in Always On High Availability Group, so backup and restored occurred over network shared location. Drives were slow, database was huge and network latency not the best  so it took a long time to add database to the availability group. To follow up backup or restore progress with start time, total elapsed time and estimated completion time in similar situation you can use following script SELECT Session_id as SPID , Command , query.text AS "Query Text" , Start_Time ,...
read more

SQL Server / MySQL / Linked Server / An unexpected NULL value was returned for column

SQL Server / MySQL / Linked Server / An unexpected NULL value was returned for column
Error: Msg 7342, Level 16, State 1, Line 8 An unexpected NULL value was returned for column “[MSDASQL].column” from OLE DB provider “MSDASQL” for linked server “LinkedMySQL”. This column cannot be NULL At the same time when I started writing this blog I also became active on MSDN forum, where I am trying to help SQL users to resolve theirs database issues. I just wanted to share with you one interesting issue appeared today (Msg 7342, Level 16, State 1, Line 8, An unexpected NULL value was returned for column) An unexpected NULL value was returned for column...
read more