how can associated 'sa' with a trusted SQL Server connection in sql server 2005?

I want to use sa user login sql server 2005 to visit my database "dotnet20" but when I set the user property in User Mapping, It Report 
when I set it, An Error Occur like follow
Cannot use the special principal 'sa'. (Microsoft SQL Server, Error: 15405)

and also when I want to Login sql server use 'sa' user, It Report
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
how can  associated 'sa' with a trusted SQL Server connection?
0
idiot
11/23/2005 6:17:32 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

6 Replies
919 Views

Similar Articles

[PageSpeed] 43

I'm having this exact same problem.

When I login using Windows authent. I can connect to the DB but cannot ad users or grant permissions.

I can create tables fine, but other than that not much? Any idea.

I basically wanted to enable SQL Authent. as well as windows in the security Tab after right-clicking on my Database, but the Windows login lacks the rights although it was used to create the DB and all.

Help !


"Our truest life is when we are in dreams awake." - Henry David Thoreau
0
BugSlayer
3/9/2006 7:11:00 PM

Basically, how can I add my Windows user account to the sysadmin role.

I couldve used the default sa account but whenever I login in SQL Serv authent. mode using 'sa' and blank Pwd on the SQL Serv Mngmt Studio Express CTP, on the 1st attempt, it says smthg. like

Cannot connect to INSPI6K\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476


Upon trying again just says

Cannot connect to INSPI6K\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

 

when I changed the Network protocol to Named Pipes or TCP/IP  I got

Cannot connect to INSPI6K\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol) (Microsoft SQL Server, Error: -1)

 

What's happening? Why can't I login as 'sa' ???

Please tell me all U  DBA-gods out there...


"Our truest life is when we are in dreams awake." - Henry David Thoreau
0
BugSlayer
3/9/2006 7:58:19 PM

One f the suggestions I recvd. was to hack the registry, and change the LoginMode of the SQL Server 2005 Express.

Any idea how to go about it, and which Reg. key to change for enabling mixed authentications(SQL & Windows), instead of just Windows auth.?

I saw this article but couldn't find that key

 http://support.microsoft.com/default.aspx?scid=kb;en-us;285097

Thanks


"Our truest life is when we are in dreams awake." - Henry David Thoreau
0
BugSlayer
3/10/2006 1:33:58 PM

OK I finally found the LoginMode key by searching the Registry and changed it to 2 (original value was 1)

Required a Restart, for it to take effect.

Thankfully not getting the trusted connection error anymore.

But now it's whining about the password.

AFAIK I never set any Pwd for 'sa' account, yet executing sqlcmd on command prompt throws error

Password Msg:18456

Is there any way to reset the sa PWD??? What's the way out?


"Our truest life is when we are in dreams awake." - Henry David Thoreau
0
BugSlayer
3/10/2006 2:41:59 PM

Phew! The problem has finally been resolved.

What a nightmare... all due to installing SQL Server 2005 Express on top of existing MSDE (from VS 7.0)

See http://forums.asp.net/1222469/ShowPost.aspx for further details.

and with some help from this article http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124596&SiteID=1

Thanks.

Moral of the story: Always unninstall previous versions. Better safe than very sorry !


"Our truest life is when we are in dreams awake." - Henry David Thoreau
0
BugSlayer
3/14/2006 3:40:10 PM

(It might not be relevant to this post But I reached here googling the solution for 'Login Failed for the user 'sa' . So after I found the solution I thought to share it here for those like me.)

There are two reasons bcoz of what we cant login through sa after installing fresh SQL Server 2005 :

Reason 1- 'sa' is "disabled" by default
Reason 2-'Server Authentication' is set to "Windows Authentication Mode" by default

We must enable sa And set Server Authentication to "SQL Server and Windows Authentication Mode"  to login through sa.

To enable 'sa', follow these steps

1- First Connect to SQL Server using Windows Authentication.
2- Expand Security folder in Object Explorer (in left side pane).
3- Then expand Login Folder and locate the 'sa' user. Right click sa and open Properties.
4- Click 'Status' in the left pane of properties window.
5- You'll see Login options in the right pane. Just select Enabled and click OK to exit properties window. sa is now enabled.
6- (Also in the 'General' page of these properties, erase the text in Password and Confirm password text boxes; and uncheck the Enforce password policy checkbox.. This will let you login through 'sa' with empty password.)

Now to  Change Server Authentication, do the following

1- In Object Explorer: Right click Your Server and open Properties
2- Select Security in the left pane of the properties window
3- On the right side you will see Server Authentication
4- Select  "SQL Server and Windows Authentication Mode"
5- Close the properties windows by clicking OK
6- Restart your Server by right clicking your Server and choosing restart

Now you can login through 'sa'

0
anwaar
3/9/2009 9:40:21 AM
Reply:

Similar Artilces:

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

2008 IIS7 connection to SQL Server 2000 on Web Server 2000: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am setting up a windows 2008 IIS7 web server, and trying to connect to a windows 2000 sql server 2000 database. I have an IIS6 Windows 2000 web server activately connected just fine. I have anonymous and windows authentication enabled. And in my web.config I have identity impersonate="true" My sql server 2000 typically uses the IISUSER anonymous user set up in IIS6 on my original windows 2000 web server. But this new IIS7 is giving me grief. I can't seem to setup the IUSR or IISUSER or anything in it. I can't even use sql server credentials in my connection string altho...

How can I get the 'entire' database, structure and data, from SQL server 2008 to SQL server 2005?
1) I can't get the 'copy database' function to work from SQL Server 2008 to SQL Server 2005. I connect ok. Everything goes to the last step and then it fails.2) I cant get a SQL server 2008 backup to restore on SQL SEerver 2005 either. The only way I know that works is to script the creation of all tables then export and import. This does work. How can I get the 'entire' database, structure and data, from 2008 to 2005? ThanksSQL newbie. Visual Studio 2008 supports a type of project called a database project. You might try importing the schema of t...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

Can't seem to install SQL server 2005? Install completes, but where is SQL Server 2005
I went to one of the Microsoft "Ready To Launch" events over a year ago. Microsoft was gracious and gave everyone who attended a free copy of Visual Studio 2005 and SQL Server 2005. I have installed the Visual Studio and use it all of the time. I also installed the SQL server 2005 but I can not find the application on my computer. After the install the only items that appear to have been installed are the following: SQL Server Configuration tools(SQL Server Configuration manager,SQL Server  Error and usage reporting, SQL Server surface area confiuration, Reporting Services configu...

new thread unable to connect sql server 2005 giving user is not associated with trusted sql server connection
Hi everyone,I am a bit new to .NET and IIS 5.0-6.0. We are developing Web Application, developers having loacal IIS 5.1 and SQL server 2005 on same machine, web.config have connection string with <connectionString="Data Source=D103A;Initial Catalog=enRouteV3.SLM;Integrated Security=True"> and on IIS, the virtual directory has "Directory Security" setting as "Intergrated Windows Authetication". It was working OK. When DB server and IIS moved to two different machine, not in common domain, infect both are independent...

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
i had to format my hard disk, and i try to recover my projects, i use this coonection (as i used before) Public oconnection As New SqlConnection("Data Source=YANIV;Password =;Persist Security Info=true;User Id= dbo;Initial Catalog=shoreshstore") but i allways get this error massege: "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection." i can't add the user "sa" to the database tried that one too: Public oConnection As New SqlConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security...

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.
Hi, How to handle "Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection." when i was access to web page. I want to on sql server authecation mode.Vikrant,.Net Software Developer,Mumbai. I think you will find very useful advice on this issue here. Good luck.  We develop a range of solutions using ASP.NET/SQL Server. AgentQuote is a recent example.Find your best local estate agent, use agentquote.co.uk. Hi vikrant,               post your code so we can ...

Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
please tellme how to resolve this error, i m using server studio management tool. and trying to connect using sql server authentication. my pc is over a domain.   Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)  check whether that sql server is allowing sqlauthentication or not.select that server -> right click it-> select  properties  -> in the window, select security -> check what is the server authentication. it should be  sqlserver and windows authentica...

Can't connect to SQL 2005 Express with SQL Server Management Studio Express
I've seen the following error posted when people try to connect to their server via their applications but didn't see anyone having problems when trying to connect with SQL Server Management Studio Express. Am I missing something here? This is the error:<<An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Erro...

Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000)
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider...

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'WinFM SQL PFS'. Login fails.
HiASP pages were properly connecting to SQL DB until I restored from a backup DB.  As soon as I finished restoring from the backup DB, I am getting the following error message.   I did not make any changes on ASP side.  IIS Server and SQL 2K Server is running on a WIN2K Server Box.Please help.Thank you.HTTP 500.100 - Internal Server Error - ASP errorInternet Information ServicesTechnical Information (for support personnel)Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login...

sql server 2005 do'nt attach sql server database file
I have sql server 2005 standard version. I want connect mu database file with microsoft sql server  database file.I receive ... provider: SQL Network Interface; error: 26 - error locating server/instance specified ... error.How to use local .mdf file with sql server 2005 (not express)  SQL Server (not express) doesn't support attaching on the fly of mdf files, so you need to do it manually. That is, open SQL Management Studio, right click the server, select attach, and that way you can permanently attach the database to the server. You'll have to use a normal connection s...

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
I have a windows 2003 server hosting MS SQL  Server 2005. Another windows 2003 server hosting my App, and clients from the local intranet and outside (web). How do I surpass this problem, when it all works fine locally on my development machine? Use Forms authentication! AlCheersAlMy BlogMapStats.NETPlease click on 'Mark as Answer' if this post answered your question! I am using Forms authentication. <connectionStrings> <add name="memSocConnection" connectionString=" Data Source=WSPASQL01; Initial Catalog=mem_soc;Integrated Security=True" providerName="Syste...

Web resources about - how can associated 'sa' with a trusted SQL Server connection in sql server 2005? - asp.net.sql-datasource

Resources last updated: 12/9/2015 1:02:22 AM