Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2008R2 SSRS Reports Cannot Connect To Datasource: Cannot create a connection to data source

We're attempting to deploy an existing SQL Server/SSRS configuration to a new set of hardware. SSRS is running on the same server as the SQL Server database we're trying to get reports from.

Whenever we attempt to test any of the reports, we receive the error:

An error has occurred during report processing. (rsProcessingAborted) Cannot create a connection to data source 'sqlConnection'. (rsErrorOpeningConnection) A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

  • The Windows user has full rights to the server.
  • The logins all appear to exist.
  • TCP is running.
  • Named instances are fine.
  • SQL Browser Service is running
  • "sqlcmd -L" shows the database server listed

I'm at a complete loss.

like image 597
Matt R. Avatar asked Jan 14 '23 10:01

Matt R.


1 Answers

Create a udl file, if it connects then the problem is the code / application, if it does not connect, then it's your firewall, connections string, dll library, service you are running IIS under not having the right permissions etc etc. Well the important thing here is probably the connection string. Do the following: create an empty text file and rename it "myconnection.udl". Now double click on the file and it will launch an applet. You can configuer the connection to your database and test it. (it will pick up registered connection libraries etc). If it gives OK, then open the udl file in notepad, you will see the correct connection string. Paste to your app connection settings. UDL files are generally misunderstood. They are simply a text file that holds the connection settings. They then call the connection dll. If the udl file works then you have a correct connection string 100%

like image 142
Ian P Avatar answered Jan 19 '23 12:01

Ian P