iam shazi_work
iam shazi_work

Reputation: 13

Snowflake SSRS ODBC error : No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command

I'm using SSRS (SQL Server reporting services) to display reports, my datasource is Snowflake

I have installed the ODBC snowflake driver and configured it properly Click here to view the ODBC configuration

I have created a shared datasource on the SSRS server (via Report manager) and put in my own credentials and the connection works fine Click here to view the connection on the SSRS Server

I'm able to build the SSRS report without any issues, when I run the report, everything works fine, I can publish the report on the server and the report renders perfectly fine on the browser

The issue is when i go back to the report the next day, i'm presented with an error:

An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'insert_name_of_my_dataset_here'. (rsErrorExecutingCommand)

ERROR [57P03] No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.

So, this also means that the following doesn't work neither:

The only thing that works is if I open my report in SSRS Report builder, I right-click EACH of my datasets ("each" is very important, it doesn't work if i don't do all of them), I run the queries manually for each of them, and then the "connection" or "session" is "re-activated" and the report runs fine, both locally AND on the server...note i do not have to re-publish the report on the server for it to run

Click here to view screenshots of my process

Steps I have taken to addresss the issue (that didn't yield any resolution):

Any assistance is welcome!

Thanks

Specs:

Upvotes: 1

Views: 6915

Answers (3)

Jeyavel
Jeyavel

Reputation: 3030

I faced the same kind of issue and fixed adding the corresponding role with the data warehouse.

In the data warehouse add role with USAGE.

Upvotes: 1

Rich Murnane
Rich Murnane

Reputation: 2940

I strongly recommend setting default "context" configurations for situations like this, setting default role, warehouse, database, and schema with commands such as this:

ALTER USER xyz SET DEFAULT_WAREHOUSE = 'WH_NAME_HERE' ;

https://docs.snowflake.com/en/sql-reference/sql/alter-user.html

Upvotes: 0

Gokhan Atil
Gokhan Atil

Reputation: 10144

Could it be related with the data warehouse name (in the ODBC settings)? Is there a typo? COSNUMER_WH or CONSUMER_WH?

Upvotes: 0

Related Questions