Log in
::
Register
::
Not logged in
Search:
Home
Articles
Editorials
Forums
Scripts
Blogs
QotD
Books
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Advertise
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
General
»
Login failed for user '(null)'. Reason: Not...
13 posts, Page 1 of 2
1
2
»»
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server...
Rate Topic
Display Mode
Topic Options
Author
Message
thanu.ind
thanu.ind
Posted Monday, January 28, 2008 1:47 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, June 27, 2008 12:37 AM
Points: 4,
Visits: 9
Hi
I getting this error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection".
My Environment Configuration.
1. Client Machine : Windows 2003 Server X64 bit Edition OS in this machine My VC++ application is running.
2. Server Machine : Windows 2003 Server 32 bit Editon OS in this machine SqlServer2000 SP4 is running.
When i connect my client VC++ application to SqlServer2000 i am getting this error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection".
I can able to create DSN(Client Machine) to SqlServer 2000 (Server machine) its created sucessfully and test connection also ok.
Can u tell any body what is problem in my setup and how to resolve this issue
Thanks in Advance.
Regards
Sudhan
Post #448158
Jeremy
Jeremy
Posted Monday, January 28, 2008 6:49 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, July 01, 2009 9:52 AM
Points: 163,
Visits: 710
I usually get this error when I'm connecting to SQL Server using Windows Authentication. When you make your DSN are you using windows authentication, or SQL Server authentication? Also, check out www.connectionstrings.com to make sure your connection string is formatted properly.
Post #448275
GilaMonster
GilaMonster
Posted Monday, January 28, 2008 7:47 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 12:17 PM
Points: 12,614,
Visits: 8,640
Looks like you're trying to use SQL authentication to a server that's configured for windows authentication only.
Gail Shaw
We walk in the dark places no others will enter
We stand on the bridge and none may pass
Post #448317
thanu.ind
thanu.ind
Posted Monday, January 28, 2008 11:50 PM
Forum Newbie
Group: General Forum Members
Last Login: Friday, June 27, 2008 12:37 AM
Points: 4,
Visits: 9
Thanks For your inforamtion.
Already In my Sql Server i am using Mixed Mode(Sql and Windows Authentication) only. Still i am getting same error.
Please provide solution for me.
Thanks
Sudhan
Post #448697
thanu.ind
thanu.ind
Posted Tuesday, January 29, 2008 12:27 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, June 27, 2008 12:37 AM
Points: 4,
Visits: 9
Hi Gail Shaw
My SQLServer 2000 machine registry value for login mode =2
HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\MSSQLServer\LoginMode = 2
Then its SQL and Windows Authentication only, is it right?
But Same setup when i try to connect another machine with SqlServer 2005 there no issues.
I am waiting for your valuable solution for me.
Regards
Sudhan
Post #448706
GilaMonster
GilaMonster
Posted Tuesday, January 29, 2008 12:47 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 12:17 PM
Points: 12,614,
Visits: 8,640
Can you post the connection string that you're using please?
Dunno about the login mde. Take a look at the properties of the server in enterprise manager and see what its set to.
Gail Shaw
We walk in the dark places no others will enter
We stand on the bridge and none may pass
Post #448710
Joe Clifford
Joe Clifford
Posted Tuesday, January 29, 2008 1:05 AM
SSC-Addicted
Group: General Forum Members
Last Login: Sunday, June 21, 2009 10:51 PM
Points: 422,
Visits: 538
If the words "Integrated Security" appear in your connection string you've got the wrong connection string for your setup.
Try something along this line:
connectionString="Data Source=dbservername;Initial Catalog=databasename;UID=sqlloginname;PWD=sqlpassword"
Post #448715
thanu.ind
thanu.ind
Posted Tuesday, January 29, 2008 1:42 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, June 27, 2008 12:37 AM
Points: 4,
Visits: 9
Here i have mention my connection string
i am using ADO db connection with DSN name,username, password
_RecordsetPtr pRs;
bstrSQLConnect += (LPCTSTR)m_DataSourceName;
bstrSQLConnect += (LPCTSTR)m_UserName;
bstrSQLConnect += (LPCTSTR)m_Password;
pRs->Open(bstrSQL, bstrSQLConnect, adOpenDynamic, adLockReadOnly,adCmdText);
Regards
Sudhan
Post #448726
GilaMonster
GilaMonster
Posted Tuesday, January 29, 2008 2:02 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 12:17 PM
Points: 12,614,
Visits: 8,640
Could we see the entire connection string please?
Just before you do the pRs->Open, print the connections string to the debug (or similar) and post the result (remving the password of course)
Gail Shaw
We walk in the dark places no others will enter
We stand on the bridge and none may pass
Post #448729
James Horsley
James Horsley
Posted Wednesday, January 30, 2008 4:23 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Friday, June 26, 2009 3:52 AM
Points: 120,
Visits: 202
You will get this error if you are using Windows authentication but the client machine is not logging into the domain (or AD) that the server is on. I have this problem linking over VPN to some client sites - the solution for me (XP client to various different versions of Windows servers running mainly SQL 2K) was to run the windows "Key Manager (probably available somewhere in control panel - but as MS like to move and rename these things all the time I have a shortcut to:
C:\WINDOWS\system32\rundll32.exe keymgr.dll, KRShowKeyMgr
Then you can add a new server to the cached credentials - e.g. click Add then
Server box: name of server e.g. MYSQLSERVER
User name box: domain and name of valid user on MYSQLSERVER e.g. MYDOMAIN\username
Password ... password for that user in that domain
OK that then try connecting and Windows should use those credentials rather than the credentials you used to log into local machine
James Horsley
Workflow Consulting Limited
Post #449743
« Prev Topic
|
Next Topic »
13 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
may
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2009 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use