Toolserver:Toolserver database

The "toolserver" database contains metadata about the various Wikimedia wikis and databases. It consists of four tables: language, namespace, namespacename, and wiki.

The "toolserver" database exists on every host, so it's possible to JOIN against it with every database. The database updates daily.

namespace
I'm fairly sure this table is deprecated, but I can't remember why. You should use namespacename.

namespacename
This table is useful for localizing the namespace name in query results. For example: This query would produce:

wiki
This table is especially useful for looking up the host of a wiki database. For example: This query would produce: This tells you that the dewiki_p database is located on the sql-s5 host.

The wiki table is also useful for things like link generation. You can select the domain name from the table for a given database to create proper working hyperlinks.