Re: User not associated with trusted SQL Server connection
From: Richard Waymire [MS] (rwaymi_ms@microsoft.com)
Date: 07/24/02
- Next message: linda deng[MS]: "Re: SQL Server registration failed because of the connection failure displayed below"
- Previous message: Peter Afonin: "Re: SQL Server registration failed because of the connection failure displayed below"
- In reply to: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Next in thread: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Reply: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Reply: 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: Tue, 23 Jul 2002 22:55:09 -0700
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". > >> >> > >> >> 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 database, > >> but > >> >> when I added a new database it appears the database > is > >> >> added using Windows 2000 authentication mode and not > the > >> >> normal SQL Server login. If I try to change login > from > >> the > >> >> Server Explorer to not use Windows 2000 login I get > >> >> the "User not associated with trusted SQL Server > >> >> connection" error. > >> >> > >> >> It appears the the Desktop Engine that comes with the > >> >> development environment, Visual Studio.Net does not > >> >> provide the SQL Server Enterprise Manager. I am not a > >> SQL > >> >> Server expert but I would like to be able to connect > to > >> >> the database using sa with blank password. Also how > to I > >> >> get a user to be a trusted user. > >> >> > >> >> Please help and provide detailed steps keeping in > mind > >> >> that I only have the Desktop engine installed from > >> Visual > >> >> Stuio.Net. How do I get this to work correctly. > >> >> > >> >> Thanks. > >> > > >> > > >> >. > >> > > > > > > >. > >
- Next message: linda deng[MS]: "Re: SQL Server registration failed because of the connection failure displayed below"
- Previous message: Peter Afonin: "Re: SQL Server registration failed because of the connection failure displayed below"
- In reply to: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Next in thread: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Reply: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Reply: Charles Parker: "Re: User not associated with trusted SQL Server connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|