While IM&P does implement a version of executeSqlQuery (and other platform AXL-ish stuff), this interface is not documented or supported for 3rd party application use. Would recommend not relying on it for production systems, it is not designed/tested for external use, and the interface may change/disappear with any given update...
That being said, not aware of any way to specify a DB other than the main/default for queries.