SSRS Error Invalid Source credential setting - sql-server

I have created a report in SSRS and got it working in the design view. When I publish on the report server I am getting the following error.
The current action cannot be completed. The user data source credentials do not meet the requirements to run this report or shared dataset. Either the user data source credentials are not stored in the report server database, or the user data source is configured not to require credentials but the unattended execution account is not specified. (rsInvalidDataSourceCredentialSetting)
I am using shared datasource and using SQLserver database connection as authentication type. Where else could I have gone wrong and Also let me know what are the settings I would have missed to update

Related

Is it secure to deploy an SSAS Tabular Model package impersonating a specific user?

I created an Analysis Services Tabular Project in Visual Studio.
I tried to set the Impersonation Information to "Current User":
Unfortunately, I get the following error:
Failed to save modifications to the server. Error returned: 'The datasource, '[Datasource Name]', contains an ImpersonationMode that is not supported for processing operations.
If I instead set "Impersonation Information" to "Specific Windows user name and password" and use my personal account, it works just fine.
I got error messages for all other options (other than impersonating a specific account). For example, the "Unattended Account" option gave me the following error:
Failed to save modifications to the server. Error returned: 'An unexpected error occurred (file 'pcsspi.cpp', line 926, function 'GetImpersonationIdentity').
A connection could not be made to the data source with the Name of '[Data Source Name]'.
I do not handle the deployment myself - I move the entire solution to a shared folder and the tech lead for that particular project deploys it.
That being said, are there any security implications for impersonating my account? Any chance I could compromise my credentials?
Its totally fine to impersonate a specific Windows username and password however using your personal account is not correct. Set up a service account that has limited access to just the resources the Tabular model needs for refreshing. (Whatever data sources it uses and nothing else)

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:
Subscriptions
Cache refresh
Snapshots
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):
I have tried putting the "use warehouse WAREHOUSE_NAME;" command before each dataset's SQL script, but Snowflake's API doesn't allow multiple SQL commands to be sent, so I already saw that this functionality was in the development pipeline for Snowflake and found this link: https://github.com/snowflakedb/snowflake-connector-net/issues/33 - this work was started in 2018 and the last update dates from Apr 2019 that says they are starting to address the JDBC driver...no mention for the ODBC driver yet
I have set the snowflake parameter client-session-keep-alive to true (https://docs.snowflake.com/en/sql-reference/parameters.html#client-session-keep-alive), but according to the community portal: A similar "keep alive" parameter is not currently available for the ODBC driver. Instead, you could issue a dummy query every few hours to keep the connection alive. (https://community.snowflake.com/s/article/faq-how-long-can-my-jdbcodbc-connection-remain-idle)
List item
I have tried to create a cache refresh plan or a snapshot schedule that creates a snapshot or caches the report every 3 hours, and it works for the first schedule, but fails with the error for the other ones
The only thing I didn't try is to have snowflake never close the connection and keep the warehouse in the "started" state indefinitely...but this would increase my cost, and i'm pretty sure it won't work since the session would end anyways after 4 hours...
Any assistance is welcome!
Thanks
Specs:
SSRS 2014
Snowflake X-small
ODBC-64 bit driver, installed from the
snowflake driver repository (tested with 32-bit also, but 64-bit is
the one that is visible to SSRS)
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.
Could it be related with the data warehouse name (in the ODBC settings)? Is there a typo? COSNUMER_WH or CONSUMER_WH?
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

SSRS Data Driven Subscription Not Generating File

In SQL Server 2014 I have a data driven subscription that is executing successfully, but no file is generated. It is a Windows File Share subscription and the report has three parameters. I've tried removing all the parameters to see if it was an issue with that, but it still does not work. I've also verified the file path and the query the subscription is based is correct so don't think there is an issue there.
The subscription returns the message:
Processing: 0 processed of 281 total; 0 errors.
EDIT #1:
More information:
I'm trying to save the files to a shared drive on test computer.
I've given "full control" rights to the service for SQL Server Agent and
SSRS to the folder.
I'm logged in as a user on a domain.
Images of steps followed:
EDIT #2:
I'm getting the following errors from the log file located at "C:\Program Files\Microsoft SQL Server\MSRS12.MYINSTANCE\Reporting Services\LogFiles"
1) Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: AuthzInitializeContextFromSid: Win32 error: 1355, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. ;
2) Error occurred processing subscription XX: Failure writing file filename : The report server has encountered a configuration error.
3) Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The report server has encountered a configuration error. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.
You can check the Subscriptions table in the ReportServer database for more detail about the subscriptions. For more detail, you can refer to the How to monitor report subscriptions.
You can check the UserName column values the user have permissions and other details.
SELECT *
FROM ReportServer.dbo.Subscriptions AS s
JOIN
ReportServer.dbo.Users AS us
ON us.UserID = s.OwnerId;
At the same time you can check the ExecutionLog3 table RowCount column in order to figure out the subscribed report returned any rows.Therefore, you can find out more details about the issue of the report.
EDITED
I simulated your error in my SSRS and then handled the problem with the help of the following steps.
Checked the error log files of the SSRS and find out the find out the
"An impersonation error occurred using the security context of the
current user"
error.
At first I refered to Configuration Manager Report Subscription to File Share fails with “An impersonation error occurred using the security context of the current user.” link but it didn't help to me.
Create a new data-driven subscription
Change the path share \ComputerName\Share to \ComputerName\c$\Share
In the data-driven subscription settings, I set the admin account to User name and Password fields.

Database is not getting updated

The application flow I configured in my SSRS/DTSX file is not updating/inserting any record in database.
When I deploy same code on DEV and PRO, it working fine. But when I execute same code in ITG environment it not updating the database. Connection managers connectors are pointing to the correct database. Configuration files dtsConfig also holds the correct credentials.
Am writing logs for each failure, there as well no trace of DB connection or query failure. I executed few queries on database to test the permissions of the configured DB user.
Unable to identify root case of why its not updating/inserting in ITG database. Is there anything am missing to validate.

Where are credentials stored for SSIS data sources?

I'm setting up a development machine in which I need to maintain an SSIS package created by another developer. I can't get the package to run on this new machine, either in Visual Studio or as a SQL Server job. The most helpful message comes from Profiler:
Login failed for user 'MyUserName'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>]
I know what the password should be, but I can't find where to set it.
To debug this, I've tried two ways of modifying the credentials to specify a different user, but the different user name is not being used in the connection attempts.
First I tried modifying the data source properties in Visual Studio.
Then I tried modifying the package config.
Data Source=.\SQL2014;User ID=DifferentUserName;Initial Catalog=dbname;...
The original user name is still being logged in Profiler, so I'm wondering where else to look for the credentials.

Resources