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

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

我正在使用 SSRS(SQL 服务器报告服务)来显示报告,我的数据源是 Snowflake

我已经安装了 ODBC 雪花驱动程序并正确配置了它 Click here to view the ODBC configuration

我已经在 SSRS 服务器上创建了一个共享数据源(通过报表管理器)并输入了我自己的凭据并且连接工作正常 Click here to view the connection on the SSRS Server

我可以毫无问题地构建 SSRS 报告,当我 运行 报告时,一切正常,我可以在服务器上发布报告,并且报告在浏览器上呈现得非常好

问题是当我在 第二天 返回报告时,出现错误:

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.

因此,这也意味着以下内容均无效:

唯一可行的是,如果我在 SSRS 报表生成器中打开我的报表,我右键单击我的数据集的 EACH("each" 非常重要,它如果我不做所有这些就不起作用),我 运行 为每个手动查询,然后 "connection" 或 "session" 是 "re-activated" 和报告 运行 很好,在本地 和服务器上 ...注意我不必在服务器上重新发布报告到 运行

Click here to view screenshots of my process

我已采取的解决问题的步骤(没有产生任何解决方案):

欢迎任何帮助!

谢谢

规格:

会不会和数据仓库名称有关(在ODBC设置中)?有错字吗? COSNUMER_WH 或 CONSUMER_WH?

我强烈建议为这种情况设置默认 "context" 配置,使用如下命令设置默认角色、仓库、数据库和模式:

更改用户 xyz 设置 DEFAULT_WAREHOUSE = 'WH_NAME_HERE' ;

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

我遇到了同样的问题,修复了添加数据仓库的相应角色。

在数据仓库中使用 USAGE 添加角色。