Skip to main content

Not associated with a trusted SQL Server connection

This error can come due to a couple of reasons. The most common reason is that the instance that you are trying to connect to has been set up as one with only Windows Only Authentication rather than Windows and SQL Server Authentication. You can check that easily by either by SSMS (SQL Server Management Studio) or in the registry settings as well (in case you do not have the client tools loaded up on the instance where you are getting this error and you inherited this set up from someone).

In SSMS, after you log in using your Windows Authentication, right click on the server and choose “Properties” and then go to the Security page and change the “Server Authentication” to be “SQL Server and Windows Authentication mode” .


Once that is done, you will need to re-start the MSSQLServer service in order for the changes to take place.
The place where it gets stored in the registry is:
HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.2005\MSSQLServer

LoginMode – if it is 1, then it is Windows mode and if it is 2, it is mixed mode (Windows and SQL Server).
Now, other times you can also get this error with a blank user name i.e:
Login failed for user . The user is not associated with a trusted SQL Server connection
You can get that error in a couple of scenarios:

1) If the server name has a space after it’s name, example: in the connection string you have specified: servername ,1433 i.e. that extra space after the servername (the instance name).

2) Not being able to resolve the Windows account that is trying to connect to the SQL Server instance. Here are some scenarios that we have seen at client sites when this happens:

a) When using Windows authentication and the machine from where the connection is being made, instead of using a domain account, a local account on that machine is being used for making the connection to the SQL Server instance. This is obviously because the domain controller and SQL Server cannot recognize the local account on other machines.

b) In the case of web applications, the account that runs IIS does not have access to SQL Server. You have to impersonate a domain user account in ASP.Net for this. This KB article covers this in detail.

c) Another common reason is when communication is being made across domains which do not have a trust relationship set up between them.

d) We have also seen this in scenarios where because of heavy network load,  communication  between SQL Server and the Domain Controller is hindered.

Comments

Popular posts from this blog

Download SCERTUP BTC 2011 Application Form

Note : Professional Courses Student can also now apply for UP BTC 2011 and date extended. The SCERT of UP was established at Lucknow in 1981 as an apex government organization at the state level. The State Council of Educational  Research  &  Training , U.P., is providing academic support to the District Primary Education Program intended primarily to accelerate the processes of pedagogical renewal in the state.   The Utter Pradesh Education Board Basic Training Certificate or B.T.C Application Form 2011 is now available for download on the Uttar Pradesh State Council of Educational Research & Training (SCERT) official website. Pre-Service Training * Training of Special B.T.C. Trainees. Training Urdu Special B.T.C. in process * Training of Shiksha Mitras, EGS/ AIE Instructors & Literacy functionaries. * Pre-service Training for physical Education and nursery training also being conducted. The thrust areas include  (a) development of curriculum, r

UP TET 2011 Exam Application,UPTET 2011 Result | UPTET 2011 Revised Result

UPTET 2011 Result | UPTET 2011 Revised Result | UPTET 2011 Updated Result |Board of High School and Intermediate Education Uttar Pradesh, Allahabad UP TET Advertisement 2011 and Exam Detail/Admit Card/Call Letter Download UP TET 2011 FORM & DETAILS  GET LATEST DETAIL ABOUT 72825 Primary Teacher Merit List UP TET 2011 Application form submission last date is 18-Oct-2011.Forms will be distributed from PNB bank all over UP.According to latest news Appearing B.Ed student also eligible for TET exam 2011 so they can also submit their forms to concern District.There is no requirement for Rojgar Registration No and Bank receipt within the application form.UP TET 2011 exam results will be avail on http://www.uptet2011.com . Now you can easily get Application from from the P.N.B bank Branches. UPTET 2011 Result | UPTET 2011 Revised Result | UPTET 2011 Updated Result |  Board of High School and Intermediate Education Uttar Pradesh, Allahabad

remove index.php from wordpress on win2003 shared hosting

No need to install any  ISAPI filter to  remove  the  index . php  from  WordPress  permalinks. No need of  .htaccess  file. . Use these simple steps to WordPress Permalinks in IIS 6.0 using Custom 404 Redirect for Windows Shared hosting/manas hosting or any windows shared hosting. When you run wordpress on IIS server your permalinks have to include the prefix /index.php/ which looks ugly and is totally un necessary.If you have these  requirements as follow:  a .IIS for Windows Shared Hosting b .WordPress Site c .Access to change your 404 error page with your web hosting. This can be remove by following simple steps. 1 .  Once installed wordpress blog on your site you’ll want to log into the admin section and select options and then select permalinks. Set your permalinks as you wish. 2 . Then  You’ll create a new text file and name it "404-error.php". In this text file you’re going to include the text: <?php // This is the default file for the s