Currently you may have code that makes decisions based on sys.databases.database_id or the built-in DB_ID() function. I have seen a lot of code out there that checks the database_id, and behaves differently based on the assumption that a value between 1 and 4 (as well as 32,767 - the resource database) means it is a system database, and anything ...