1. Login into the Admin UI section of your SMA, example http://k1000-example/adminui
From here you can go into any module of the SMA and hover over any script, manage installation, ticket, asset or report, the database ID will be displayed in the web browser status bar.
Here is an example:
2. The same can be done with to determine the ORG ID on an ORGs-enabled SMA.
Note: This information can be used to create custom MySQL reports via Reporting, or by using a Third-Party MySQL connection. More info on how to setup this connection is here.