`[Illuminati Views$]`
====

For consistency, and because we need a name I'll call these *"Illuminati Views"*, because why not. :)

The first thing that must be cleared up is **everything is an object**, including Illuminati Views. All databases have a table, `sysschobjs`, which contain that database's objects. And all databases pull from the `sysschobjs` in Resource DB (mssqlsystemresource).

    SELECT
      (SELECT count(*) FROM mssqlsystemresource.sys.sysschobjs) AS resource,
      (SELECT count(*) FROM msdb.sys.sysschobjs) AS msdb,
      (SELECT count(*) FROM master.sys.sysschobjs) AS master;
    
    resource    msdb        master     
    ----------- ----------- -----------
           3665        3635        2435

You can see here some isolation, but it's not purely hierarchical. A lot of things are visible in the Resource DB but are hidden from outside it. Sometimes those things bleed through and are used under the hood elsewhere but not available directly.

From all the objects in `sys.sysschobjs` across all schemas I created a script and brute-force detected 18 of our Illuminati Views,

    [V - -667123516] used to detect -620952411      [sys].[dm_db_xtp_table_memory_stats$]
    [V -       -495] used to detect -217345680      [sys].[sql_expression_dependencies$]
    [V -       -447] used to detect -270688537      [sys].[conversation_endpoints$]
    [V -       -446] used to detect -332991205      [sys].[conversation_groups$]
    [V -       -444] used to detect -397721966      [sys].[services$]
    [V -       -442] used to detect -123002535      [sys].[service_contracts$]
    [V -       -441] used to detect -189344319      [sys].[service_message_types$]
    [V -       -418] used to detect -825154186      [sys].[numbered_procedures$]
    [V -       -397] used to detect -993951361      [sys].[indexes$]
    [V -       -394] used to detect -150            [sys].[system_parameters$]
    [V -       -393] used to detect -532309064      [sys].[parameters$]
    [V -       -392] used to detect -149            [sys].[system_columns$]
    [V -       -385] used to detect -506864465      [sys].[objects$]
    [V -       -259] used to detect -463422670      [sys].[server_audits$]
    [V -       -225] used to detect -375483549      [sys].[messages$]
    [V -       -224] used to detect -441193657      [sys].[configurations$]
    [V -       -106] used to detect -151            [sys].[syscolumns$]
    [S -         34] used to detect 34              [sys].[sysschobjs$]

Both of the numbers are the `sysschobjs.id` of the source and the Illuminati View detected. The first letter corresponds to the `sysschobjs.type` of the `sysschobjs` that I used to generate the Illuminati View's name from. The base `TYPE` was of the object used to derive the Illuminati View name. Though I tested all of the objects (including ones not of `TYPE IN ('S','V')`), only one of them was detected of `type='S'`, `SYSTEM_TABLE`. All the other types used to find Illuminati Views were mere `VIEW`.

After that I started playing around with the `mssqlsystemresource` directly. With this you can just query `mssqlsystemresource.sys.sysschobjs`. Using that method, I found one more, `sysschobjs_dbscoped$` which has no corresponding object. Most Illuminati Views are in fact just lower level sources for Catalog Views by similar names. One exception is `sys.sysschobjs$`; `sysschobjs` is not a view, but a `SYSTEM_TABLE`. And, it may be somewhat confusing to call them *lower level* because while often Catalog Views pull from them, at the very least they sit above System Tables,

* `sys.messages$` for instances reads from `sys.sysusermsgs`
* `sys.parameters$` for instance reads from `sys.syscolpars`

Out of the 3665 objects in `mssqlsystemresource.sys.sysschobjs`

 * 2422 objects are in `msdb.sys.sysschobjs`
 * 1243 objects are not in `msdb.sys.sysschobjs` (this includes the Illuminati Views)
 * 2402 objects are in `master.sys.sysschobjs`
 * 1263 objects are not in `master.sys.sysschobjs`

*All of this is from SQL Server 2017 on Ubuntu, though most of is not likely to change much*

There is a wrapper specifically for [`sysschobjs` in the OrcaMDF project](https://github.com/improvedk/OrcaMDF/blob/1105871a646a4e897829205d5e59dd6daa19b959/src/OrcaMDF.Core/MetaData/DMVs/ObjectDollar.cs), you can see the use of that [here](https://github.com/improvedk/OrcaMDF/search?utf8=%E2%9C%93&q=ObjectsDollar&type=). Apparently, for SQL Server 2008 the MDF exploration needed no other Illuminati Views than `sysschobjs`, or perhaps the others on this list were not yet available.