In order to query a database, you have to first connect to the required database, and then select the required data source and root object from among multiple existing connections.
Connecting to a database
When you switch to DB Query View, any database that the active design uses as a data source is displayed in the Browser pane. If you wish to query some other database, click Quick Connect in the DB Query View toolbar.
For a list of supported databases, see Database Query | Supported databases.
All the existing connections and the root objects of each are listed, respectively, in two combo boxes in the toolbar of the Database Query window (screenshot below). After selecting the required data source in the left-hand combo box, you can select the required root object from the right-hand combo box.
In the screenshot above, the database with the name StyleVision DB has been selected. Of the available root objects for this database, the root object ALTOVA_USER has been selected. The database and the root object are then displayed in the Browser pane.