SQL Server ku5zi-bj.mdf aka The Resource Database

9 07 2014

Starting in SQL Server 2005 Microsoft introduced a hidden database called the Resource Database. The resource database contains all the system objects included with SQL Server.

The addition of the resource database was done to expedite the upgrade process, as opposed to adding, modifying, or removing system objects during the upgrade a new resource database is simply copied in and replaces the original resource database.

The objects in the resource database are made available through logical links in the sys schema of all databases.  I must point out that from experience, performing, extreme security hardening, not all of the objects are available to be seen by the mere mortal.

Want a copy of the resource database to play around with?

The easiest way to accomplish this is to grab it from the installation media, although it may be out of date if you have applied any service packs or updates.

I found the file ku5zi-bj.mdf buried deep with in the installation media folder structure. On SQL Server 2014 it is located here x86\Setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn.

Simply copy the database file ku5zi-bj.mdf to where ever you may be keeping your data.

Attach the database through SSMS and be sure to update the .mdf location, remove the log file, and change the name of the database to something else using the AttachAs option.