Amazon goes after Microsoft’s SQL Server with Babelfish for Aurora PostgreSQL. What is interesting is that a direct port of SQL Server to PostgreSQL or Aurora PostgreSQL can be challenging due to incompatibilities in data types, and in functions. What is promised in Babelfish is that it will create a layer between standard SQL Server TSQL and PostgreSQL to be …

Babelfish for Aurora PostgreSQL Read more »

Posted 3/29/2020 — Edited 3/30/2020 to fix a couple of copy and paste errors, and to clarify a couple of items. Thanks Charlie for your suggestions. I have worked on many projects that involved doing some query work then writing those results to a file. After copying and pasting the typical sp_OA… methods to write to a file too many …

SQL Server – Writing to a File Read more »

  The question came up as how to find a link from blog storage that is corrupt back to the table and row that contains that data. The is no link from the blob storage back to the table and row, but this is a link from the data page containing the table and row off to the blob data. …

SQL Server Row Data Linking to Off Row Data Read more »

From time to time I get asked about checkDB, and there are many solutions out there, but I have one that I generally use that is very simple and does the job. The script below created a stored procedure in the DBHealthHistory database that can be used to check as many databases as you can get through in a specific …

My CheckDB Script Read more »

Updating SQL Server statistics may not be as obvious as it may sound. Imagine this scenario. I invite you over for dinner and a game of Scrabble. After dinner, I start to do the dishes, while you set up the game. Rather than just doing the dishes that are dirty from our dinner, I decide to take all the dishes …

Updating SQL Server Statistics Read more »

If you use the SQL Server maintenance plans to run DBCC Check DB, you are not allowed to include TempDB in your DBCC CheckDB sequence. For a while I was using maintenance plans, and ending up adding a separate job step to run TSQL to just check TempDB. Rather than using two different steps, the regular maintenance plan, and a …

DBCC CheckDB All Databases Read more »

Here is the solution provided by Patrick Flynn. Congratulations Patrick for being one of this weeks winners. I really liked this solution for a number  of reasons, first it showed how to pull data from DBCC Page and actually convert it into rows and columns that could then be inserted back into a table. Secondly due to its use of …

Corruption Challenge 4 – Alternate Solution Read more »

The following are the steps that I went through to create a more difficult Database Corruption Challenge for Week 4. Here is how I built the database, nothing fancy, however I did add an extra FILEGROUP called [UserObjects]. Notice, that to make things slightly more challenging, the database is a Case Sensitive Accent Sensitive database. I hope this didn’t cause …

Week 4 – Building the Corrupt Database Read more »