From: sloan on 5 Mar 2010 13:12 http://msdn.microsoft.com/en-us/library/ms143705%28SQL.90%29.aspx http://msdn.microsoft.com/en-us/library/ms188670%28SQL.90%29.aspx This talks about "Mixed Mode" (which is integrated (windows) authentication AND sql authentication). And the second one shows how to get sa working....if you want sql authentication working after the face. I think your original post said were using Express. Again. If "MyMachine\Jeff" is your username...............then you need to setup "MyMachine\Jeff" on the SqlServer..........OR.............you need to make sure sql-authentication is enabled, and you're specifying a sql-authentication typ'ish connection string. Also see: http://www.connectionstrings.com/sql-server-2005#p1 "Trusted Connection" is (yet) another name for Integrated and Windows authentication. ......................... "sloan" <sloan(a)ipass.net> wrote in message news:%23L2o83IvKHA.3860(a)TK2MSFTNGP06.phx.gbl... > > So what does your connection string look like? > > Are you using integrated security? Or are you specifying a sql > authentication username and password? > > ............. > > Because if you're using integrated security (also called windows > authentication)...................then your LOGIN and dbUsers have to > reflect "Jeff" ............... > > Or you need to switch to sql authentication. > > NOTE: Sql Authentication isn't "on" be default. You either need to > install it that way, or activate it later. > > ......... > > http://www.google.com/#hl=en&source=hp&q=sql+authentication+vs+windows+authentication&aq=2&aqi=g10&aql=&oq=sql+auth&fp=c26c79a56c95bda8 > > > > http://www.google.com/#hl=en&q=sql+authentication+how+to+activate&aq=f&aqi=&aql=&oq=&fp=c26c79a56c95bda8 > > > > > > "Jeff" <it_consultant1(a)hotmail.com.NOSPAM> wrote in message > news:%23G4dn4GuKHA.1796(a)TK2MSFTNGP02.phx.gbl... >> That method gives my name, not the database user I try to connect to db >> with. >> >> So the string is "Jeff on PC3" (I called my computer PC3, not a very >> original name) >> >> >> > > Re: Login failed for user 'x', Error: 18456 it_consultant1(a)hotmail.com
From: Jeff on 8 Mar 2010 03:45 These are the connetion strings I've tried, without success: <add name="LocalSqlServer" connectionString="Server=192.168.x.x\SQLEXPRESS;Database=myDB;Integrated Security=false;User ID=myUser;Pwd=verydifficultpassword;"/> <add name="LocalSqlServer" connectionString="Server=PC3\SQLEXPRESS;Database=myDB;Integrated Security=false;User ID=myUser;Pwd=verydifficultpassword;"/>
From: sloan on 8 Mar 2010 08:47 Ok, so you are using Sql Authentication. (Integrated Security=false is the key indication here, and you're passing in a User ID and Pwd. Did you verify that your SQLExpress is "Sql Authentication" enabled. Because by default it is disabled. Again, SqlExpress (by default) allows WindowsAuthentication (Integrated Security). Therefore you need to manually enabled SqlAuthentication on SqlExpress. ............... http://www.lmgtfy.com/?q=sql+authentication+how+to+activate (not trying to be a smartbutt, I just think the website is funny) "Jeff" <it_consultant1(a)hotmail.com.NOSPAM> wrote in message news:uYwD9upvKHA.6140(a)TK2MSFTNGP05.phx.gbl... > These are the connetion strings I've tried, without success: > <add name="LocalSqlServer" > connectionString="Server=192.168.x.x\SQLEXPRESS;Database=myDB;Integrated > Security=false;User ID=myUser;Pwd=verydifficultpassword;"/> > > <add name="LocalSqlServer" > connectionString="Server=PC3\SQLEXPRESS;Database=myDB;Integrated > Security=false;User ID=myUser;Pwd=verydifficultpassword;"/> >
From: Jeff on 8 Mar 2010 10:29 When I installed sql servcer I specified that it should use mixed mode in authentication. And that I also can see in the Server Properties also: Servr Authenticatiuon: SQL Server and Windows Authentication mode
From: Jeff on 8 Mar 2010 10:57
I think the error has something to do with orphaned users, just as Tibor Karaszi is suggesting I did this select from the Masters table: select * from sys.databases There I found my database, I took a note of the owner_sid, and then I checked in sys.server_principals for that specific user, there the user wasn't found, none have that sid, I checked agaist the sid column. Tibor mentions running a alter authorization script, but I'm not sure how to run it |