Re: User not associated with trusted SQL Server connection
From: Richard Waymire [MS] (rwaymi_ms@microsoft.com)
Date: 07/25/02
- Next message: Steve Thompson: "Re: Transaction Log"
- Previous message: Sue Hoegemeier: "Re: Row Level Security"
- In reply to: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Richard Waymire [MS]" <rwaymi_ms@microsoft.com> Date: Thu, 25 Jul 2002 09:37:34 -0700
don't know the answer about the ASPNET problem. What this message typically
means is that the SID is already present in the database. Run "select *
from sysusers" in the database and see what userids already exist..
-- Richard Waymire, MCSE, MCDBA This posting is provided "AS IS" with no warranties, and confers no rights. "Charles Parker" <cgparker@csi.com> wrote in message news:12cf01c23349$ffde67b0$35ef2ecf@TKMSFTNGXA11... Actually when I execute the sp_grantdbaccess command for the database I want to connect to I get the following error. Msg 15063, Level 16, State 1, Server XPSPRO200N\NETSDK, Procedure sp_grantdbaccess, Line 116 The login already has an account under a different user name. I performed a sp_mshasaccess which displays the same login I was using for db access. >-----Original Message----- >right - leave the UID & PWD parameters out and use the "trusted_connection = >true" parameter instead and then it should work. > >-- >Richard Waymire, MCSE, MCDBA > >This posting is provided "AS IS" with no warranties, and confers no rights. >"Charles Parker" <cgparker@csi.com> wrote in message >news:049c01c232b9$afbcf4d0$19ef2ecf@tkmsftngxa01... >> Richard, >> >> I followed the steps you outlined below and they completed >> using the osql utility. I then changed the connection >> string within the application to use the user as follows: >> >> string connectionString = "server=(local)\\NetSDK; >> uid=Charles Parker; pwd=*******; database=ASPDotNetBugs"; >> >> Of course with the password spelled out but I receive the >> following error. >> >> Login failed for user 'Charles Parker'. Reason: Not >> associated with a trusted SQL Server connection. >> >> Did the osql utility make permanent changes to the >> database or is it just for that instance. >> >> >> >-----Original Message----- >> >first connection requires you to be a local admin, when >> you connect again >> >run a query >> > >> >exec sp_grantlogin [mydomain\myuser] >> > >> >then... >> > >> >use [mydatabase] >> >exec sp_adduser [mydomain\myuser] >> > >> > >> >You can do this with osql, log in as osql - >> Smyserver\myinstance -E >> > >> >replace myserver\myinstance with the >> servername\instancename that were >> >installed for you to log in, then run each of the >> commands above followed by >> >the word go. >> > >> >So a run would look like >> > >> >c:> osql -Sfred\msde -E >> >1> exec sp_grantlogin [mydomain\fred] >> >2> go >> ><results returned here> >> >1> use [mydb] >> >2> go >> > >> >etc. >> >and finally >> >1> Exit >> > >> >to quit osql. >> > >> >Hope this helps, >> > >> >-Richard >> > >> >-- >> >Richard Waymire, MCSE, MCDBA >> > >> >This posting is provided "AS IS" with no warranties, and >> confers no rights. >> >"Charles Parker" <cgparker@csi.com> wrote in message >> >news:0ce201c232aa$69db8b20$2ae2c90a@phx.gbl... >> >> OK, how do I do that. How do I make a Windows 2000 user >> >> have trusted access to SQL Desktop version. This is all >> >> for development purposes. I just want to be able to >> >> connect to the SQL Desktop database through code, but if >> >> the integrated connection is best how do I set one up. >> >> >> >> >> >> >-----Original Message----- >> >> >If you use sa with a blank password you will probably >> >> have a virus on your >> >> >system in a few minutes. I think you really should >> >> pursue the integrated >> >> >connection. >> >> > >> >> >-- >> >> >Richard Waymire, MCSE, MCDBA >> >> > >> >> >This posting is provided "AS IS" with no warranties, >> and >> >> confers no rights. >> >> >"Charles Parker" <cgparker@csi.com> wrote in message >> >> >news:049e01c232a3$8c3f4550$3bef2ecf@TKMSFTNGXA10... >> >> >> I am having a lot of problems and read a lot of >> >> >> conflicting information about the SQL Server 2000 >> >> Desktop >> >> >> Engine as installed by Visual Studio.Net. At first I >> >> have >> >> >> trouble connecting to the included Northwind database >> >> >> using the usual uid=sa; pwd=; connection string. It >> >> always >> >> >> gave the error "User sa not associated with trusted >> SQL >> >> >> Server connection". >> >> >{wH$4hO a> >> >> >> After looking at several web sites and this >> newsgroup I >> >> >> discovered I could I did not have to specify a uid >> and >> >> pwd >> >> >> in the connection string by >> >> using "Trusted_Connection=yes". >> >> >> >> >> >> Well this worked for the provided Northwind
- Next message: Steve Thompson: "Re: Transaction Log"
- Previous message: Sue Hoegemeier: "Re: Row Level Security"
- In reply to: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|