SQL Server: Fix Msg 8630, Level 16, State 1, Line 1 – Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).

This is going to be a quick reference for people encountering this error and to do the fix more than a blog post but I do show a small trick on how to do an UPDATE in chunks 😉 The Error: I ran into this error with (Microsoft SQL Server 2012 (SP4-GDR) (KB4057116) - 11.0.7462.6 … Continue reading SQL Server: Fix Msg 8630, Level 16, State 1, Line 1 – Internal Query Processor Error: The query processor encountered an unexpected error during execution (HRESULT = 0x80040e19).

Advertisement

SQL Server: Fix – The server principal “elevated_user_login” is not able to access the database “my_database” under the current security context

The Error: This error wasted my morning. Although I have solved this issue before, it took a while to google and fix it again. So, this post is for my own edification and reference if for no other reason! --Proc [MyProcedureName] started AT:2020-10-13 09:49:43.4632735Msg 916, Level 14, State 1, Procedure MySchemaName.MyProcedureName, Line 31 [Batch Start … Continue reading SQL Server: Fix – The server principal “elevated_user_login” is not able to access the database “my_database” under the current security context

SQL Server: Fix: Transaction (Process ID) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction

I have a nightly SQL Agent job that aggregates backup information from system views to power a Power BI dashboard that the DBA's review periodically for database backup failures. It is actually a PowerShell job that runs every night in parallel to collect the data from hundreds of instances (both SQL Server and Oracle). As … Continue reading SQL Server: Fix: Transaction (Process ID) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction

SQL Server: Delete In Chunks To Avoid Log Growth

Today, I had to perform a DELETE that happened to remove quite a bit of data. This caused two issues for me Log file growth which fills up the Transaction Log of the DB TempDB was getting full To avoid both problems I deleted in chunks. OPTION #1: DELETEing in Chunks is easier than you … Continue reading SQL Server: Delete In Chunks To Avoid Log Growth

SQL Server: A More Flexible xp_ReadErrorLog That Reads All Error Logs Including Archives

I am sure that all of you are already familiar with the extended stored procedure xp_ReadErrorLog and its less flexible and published equivalent sp_ReadErrorLog (which takes less parameters) for reading the SQL Server Error Log. xp_ReadErrorLog - To read current error log: The extended stored procedure xp_ReadErrorLog is very useful. It helps with reading the … Continue reading SQL Server: A More Flexible xp_ReadErrorLog That Reads All Error Logs Including Archives