MSCRM: A valid database connection string could not be obtained.

Options
I am able to connect to my CRM online instance. in fact it successfully downloads the metadata.
However, when I do a simple SQL query such as:

select name from accounts

I get the following error:
A valid database connection string could not be obtained.

What am I doing wrong?