SQL SERVER – SQL SERVER – Simple Example of Recursive CTE – Part 2 – MAXRECURSION – Prevent CTE Infinite Loop

Yesterday I wrote about SQL SERVER – SQL SERVER – Simple Example of Recursive CTE. I right away received email from regular reader John Mildred that if I can prevent infinite recursion of CTE. Sure! recursion can be limited. Use the option of MAXRECURSION. USE AdventureWorks GO WITH Emp_CTE AS…
Read More

SQL SERVER – mssqlsystemresource – Resource Database

Just a day ago I received following email “Dear Pinal, While I was exploring my computer in directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data I have found database mssqlsystemresource. What is mssqlsystemresource? Thanks, Joseph Kazeka” Simple question like this are very interesting. mssqlsystemresource is Resource Database. It is read only database and…
Read More

SQL SERVER – FIX – ERROR : 9004 An error occurred while processing the log for database. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

ERROR : 9004 An error occurred while processing the log for database. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log. If you receive above error it means you are in great trouble. This error occurs when database is attempted…
Read More