.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT
Post New Web Links

Cannot create a connection to data source ... Login failed for user: BUT not for all reports!

Posted By:      Posted Date: November 04, 2010    Points: 0   Category :Sql Server

SQL Server 2008 using Report Builder v2.0  (Microsoft SQL Server Reporting Services Version 10.0.2531.0)

We have several reporting service apps with many reports in each one. There is a set of 4 reports that all report on similar info (but grouped differently) that can be run by me and other network administrators but not any "regular" users. On these reports only, they are getting "Cannot create a connection to data source ... Login failed for user...". As I've said there are other reports that regular users can run just fine!? ALL reports use the same Shared Connection Data Source on the server that is set up as Windows Integrated Security. The Data Source's Security allows Domain Users to browse.  

I've uploaded a test report to SSRS whos SQL is "SELECT 'test' as testField" and that's it: and is connected to this same Data Source and users still get the Login Failed error... even tried creating and using a new Data Source that points to the same SQL Server DB to no avail. Examining the rdl's XML doesn't reveal anything either.

Reporting Server is a different machine than the SQL Server DB holding the data.

The only clue is that working reports were created a year before now.

View Complete Post

More Related Resource Links

System.Data.SqlClient.SqlException: Login failed for user . Reason: The account is disable


Hi All,

Thank you for advance.

I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.

now sometimes i am getting the "System.Data.SqlClient.SqlException: Login failed for user '<UserName>'. Reason: The account is disabled." error.

then i restarted the windows service manually and working.

what is the problem in my sql server connection and how to fix that issue?

Login failed for user 'sa'. (.Net SqlClient Data Provider)

Hi,     I am able to login using windows Authentication to my DB server. But when I am trying using Sql server authentication "sa" then following error is coming:   =================================== Cannot connect to .. =================================== Login failed for user 'sa'. (.Net SqlClient Data Provider) ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476 ------------------------------ Server Name: . Error Number: 18456 Severity: 14 State: 1 Line Number: 65536 ------------------------------ Program Location:    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) &

Cannot create a connection to data source !!!! SSRS 2005

I cannot get this error resolve either for myself or any users, and I'm actually part of the Admin group!  Furthermore, a user with whom I'm tring allow to view this report keeps getting prompted for their windows username and password.  I thought that since this datasource was set to Windows Authentification that it would just pass it through? I'm pulling my hair out at this point: Screen Shots: http://www.webfound.net/datasource_connection.jpg http://www.webfound.net/datasource_connection2.jpg http://www.webfound.net/datasource_connection3.jpg Also As far as I know, I've given sufficient permissions to the right logins and right users on my SQL Databases and related stored procs that the datasets (not datasource) run An error has occurred during report processing. Cannot create a connection to data source 'datasourcename'. For more information about this error navigate to the report server on the local server machine, or enable remote errors

Cannot create a connection to data source ''


I copied an old report and changed the data sources. The report works fine in the designer and on the report server. But when I run it from the server on which the database is located it gives me the following error. Works fine when I use 'Store credentials in report server'. tried anonymous login too. Doesnt work.

  • An error has occurred during report processing.
    • Cannot create a connection to data source '<name of my datasource>'.
      • For more information about this error navigate to the report server on the local server machine, or enable remote errors
      • Please help.     &nb

Login failed for user (.Net SqlClient Data Provider)


I have a dedicated server, which runs windows server 2003 web edition. I access the server using remote desktop. I have installed sqlserver express 2005 on the server, along with management studio express. I have problem running the sql script that would install the database. It says that remote connection is disabled by default on sql express 2005. So this is what I did ( as suggested by this article: http://www.datamasker.com/SSE2005_NetworkCfg.htm):
Enable the TCP/IP protocol using the Surface Area Configuration Utility 
Make sure the TCP/IP protocol is enabled in the SQL Server Configuration Utility 
Make sure the SQL Server browser is started.
Make sure SQL Server and SQL Server Browser are exempted by the firewall on the server machine. sqlservr.exe and sqlbrowser.exe as an exception in the windows firewall

Still no success. Reading various articles on internet, a few suggested i should grant access to certain user by running the following command

The problem is that i keep getting the error login failed, even when i try to connect to the sqlserver using management studio. When I use remote desktop it logins as administrator.
Can someone please

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


I have been using my workstation on a Windows 2000 SQL Server network for several weeks without any issues. I am using Activant Prophet 21 accounting software along with MS Office 2010 Professional on a Windows 7 Ultimate platform. I recently upgraded to the new Windows Live. While working with Access today, I suddenly lost connection to the server (also my internet server). I received the following message:

Unable to connect
SQLSTATE = 42000
Microsoft OLE DB Provider for SQL Server
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Potential Reasons:

1. Invalid User Name 

2. Invalid Password

3. Invalid Server Name

4. Invalid Database Name

 Any suggestions?

P.S. I am able to access the SQL Server using my user name from a different (Window XP) workstation (i.e. database functions and internet access)


Login failed for user ''. The user is not associated with a trusted SQL Server connection.

First at all, My name is Yuri.
I have a problem with SQL server 2005 when I want to select data from sql server database on another machine and then insert data to local sql server 2005 database. And I Have checked that authentication mode for both sql server database is mixed mode.
If anybody can give suggestion for my problem, many thanks before.

Best Regards,


Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


I am receiving the following message when connecting via query analzyer to SQL server using windows authentication.(error 18452). I have a login created with the sys admin server role on the server. When I connect using SQL authentication it works.

I added myself to the local admin group on the server, this allows it to work. The same situation is seen with another user.

I am using windows 2000 sp4 server and SQL 2000 SP3, connecting from NT4. I get the same issue if I use TCP or named pipes. We have been using SQL security but are moving to windows authentication - but this issue is stopping us.

I have checked and upgraded my version of MDAC to match the server version 2.7 (sp1)

Any help would be much appreciated.



Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.


I have two SQL 2000 Server. Both server needs to communicate with each other. The setup was working for last 8 month. Last week, we disconnected the server 2 from the network and then we reconnected the server 2 again. Now when we tried to call StoredProcedure of Server 2 from Server 1 we get the following error:

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

This used to work.

However if we call storedprocedure of server 1 from server 2, it works just fine.

This is an old problem and this problem has been answered several times. The problem is none of them are working for me.

The main solution that has proposed is that I should set login option to Mixed Mode. My authentication mode has been set to mixed mode, I have also checked the registry and that's ok too. What I can't get what used to work and now it doesn't.


I am completely lost.

Login failed for user 'sa' .The user is not assosiated with a trusted SQL Server Connection.


Dear Friends,

                   I have downloaded a project from



 ,which is an example of 3 tier architecture.

To run this project the author has suggested to change the 'value' in <appsettings> of webconfig file.

previously it was

 <add key="SqlConnect" value="ABRAHAMOS;database=TimeManagement;uid=sa;pwd=moses;" />

I changed it to

 <add key="SqlConnect" value="server=ABC-314FF72122C\SQLEXPRESS;database=TimeManagement;uid=sa;pwd=moses" />

as 'ABC-314FF72122C\SQLEXPRESS'  is the server name of my sqlserver 2005.

when i run the project and try to enter something from a page then error occur as  'Login failed for user 'sa' .The user is not assosiated with a trusted SQL Server Connection.'

what could be the possible reason?????????


Till now I have tried following things:

1. I kept the pwd value blank and tried to run-------- then also the same problem

2.   I kept the pwd value .(dot) and tried to run-------- then also the same problem

3.   I tried to chan

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Login failed for user IIS APPPOOL\DefaultAppPool


Any Ideas on how to fix this issue?

Visual Studio 2005, Windows 7 64bit, SQL Server 2005 Express

Cannot open database "sql2" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.

Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM'

Hi,   can someone help me with this error. Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM' [CLIENT:<local machine>] I've found several Threads but not with the NT AUTHORITY\SYSTEM.   Thanks for help.   Jens

Login Failed for User "XXX" when login from a ETL machine for Sql Server 2005 SP2

Hi Guys, I have a straange issue with Login Failed errors coming intermittently probabaly twice in a week: I have a  production Database on Server A and we have Two ETL servers on Server B and Server C. Sometimes when the ETL's (SSIS) run from SERVER B I do get an error stating login failed for user "XXX" this user is a sql server user. And when I run the same package from Server C it does not give any error and runs smoothly. Both the packages uses the same configuration file to connect to the same database with the same user credentials. Also this error is not a frequent error but comes along once or twice in a weeK. Can anyone shed some light on this and let me know the root cause. Both servers have the same sql client version as well. All servers mentioned above are 64 bit windows 2003 servers. Raju

Login failed for user sa

Hi All, I am using sa login to connect my databse from sqlbrowser.It is logging sucessfully but if i check eventlog it is saying that Login failed for user sa .Password did not match that for the login provided eventid 18456. how i can resolver this issue any ideas/Suggestions.

login failed for user nt authority/system

Please help on This error, I'm Using sql 2005 , windows authentication Event viewer,application: source :mssgl server,id 18456,servirty 14 state 16, logine failed for use "nt Athority/system,client: local machine , this error i'm gatting frequently Regards Asif

SQL Server 2005 "Login failed for user" sa

I have not been able to install SQL Express SP2 (standard or advanced) on Vista Ultimate (RTM). Every time I try to install, I get the following error message: SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client][SQL Server]Login failed for user 'sa'. Refer to server error logs and setup logs for more information. When I check the logs, the only information I can find that is at all useful is: Doing Action: Do_sqlScriptPerfTime Start: Do_sqlScript : Thu Mar 01 21:35:42 2007Service MSSQL$SQLEXPRESS with parameters '-m SqlSetup -Q -qSQL_Latin1_General_CP1_CI_AS -T4022 -T3659 -T3610 -T4010' is being started at Thu Mar 01 21:35:42 2007SQL service MSSQL$SQLEXPRESS started successfully waiting for SQL service to accept client connectionsService MSSQL$SQLEXPRESS started at Thu Mar 01 21:35:48 2007SQL_ERROR (-1) in OdbcConnection::connectsqlstate=28000, level=-1, state=-1, native_error=18456, msg=[Microsoft][SQL Native Client][SQL Server]Login failed for user 'sa'.         Error Code: 0x80074818 (18456)Windows Error Text:   Source File Name: lib\odbc_connection.cppCompiler Timestamp: Wed Jun 14 16:28:15 2006     Function Name: OdbcConnection::connect@connectSource Line Number: 148 Has anyone else run into this issue and resolved it? I have seen posts for earlier versions of SQL Express that said to run
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend