I am trying to execute a query in IntelliShell, However when I open intellishell for a particular collection and execute a simple find query I get the following error:
Failed to retrieve documents
[null.WidgetPublished@STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!
Stacktrace:
|_/ java.lang.Exception: [null.WidgetPublished@STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!
|____/ Illegal argument: Database must be set.
Now, I know that this is happening because there is no db set up for my mongo host. However I am unable to set the db. I'm using the following command to set it, but nothing seems to work.
use dgmdetails;
where dgmdetails is my db name.