If dbidparm is greater than zero, then the ID for the supplied database is returned. If dbidparm is less than zero, then the ID for the current database is returned. If dbidparm is not supplied or is NULL, then IDs for all databases running on the database server are returned.
Cloud note: Because of tenant database isolation rules, when this system procedure is run in the cloud it returns only information about
the current tenant database.
No privileges are required to execute this system procedure for the current database. To execute this system procedure for
other databases, you must have either the SERVER OPERATOR or MONITOR system privilege.