I have been searching for the answer for 2 months, but still no success. Below the setup and connection string and all checked already.

Firstly my errorlog file error = 18456 Severity 14 State 11 (Login failed for user OLDPC/GUEST. Token based server access validation failed with an infrastructure error. Check for previous errors. [client 192.168.0.10])

I am using SQL Server 2008 Enterprise edition. Running on pc with XP SP3. Server 2003 installed, although running from xp. ip = 192.168.0.17
Name = OLDPC. sql server setup with windows authentication only. Database = ServerTestData
client pc running xp sp3. SQL server 2008 EE also installed. ip = 192.168.0.10
Connection string in vb6 sp6.

a previous error reads = The sql server network interface library could not register the service principal name (SPN) for the sqlserver service. error:0x54b, state 3. Failure to register an spn may cause integrated authentication to fall back to NTLM instead of KERBEROS.

From previous posts i've picked up the following:
1.I dont have login access to server. Sql validated the windows user token, know who it is, but the user was not granted access.
2.Login id needs a profile - how do I create such profile?
3. Run as administrator - The name on login error "OLDPC\User" (User) is the administrator. After numerous setting or setup changes as per another help link, I've tried to connect to server via management studio from this pc. Login failed error also occured.
4.I've unchecked 'simple file sharing' in control panel/folders/view.
5.I've removed all other users from server pc and left only User as administrator. There is also a guest user wich i've switched on AND off to no avail. When trying to connect app to server, it seems that it is trying to connect as guest. I've also removed AND re-added the User(administrator) password.
6. I've used the following connection string:
'MyConnObj.Open "Provider = SQLNCLI10; Data Source=OLDPC,1433; Network Library=DBMSSOCN;Initial Catalog=ServerTestData;Trusted_Connection=yes;" AS WELL AS ------------------->>>>>
'MyConnObj.Open "Provider = SQLNCLI10;Data Source=OLDPC,1433;Network Library=DBMSSOCN;Initial Catalog=ServerTestData;User ID=sa;Password=********;"
7.I've followed ALL the help and links on setting the firewall, allowing ports on TCP and UDP. I've also enabled tcp/ip in configuration, confirmed port number at IPALL.
8.I've changed port numbers and allowed them through firewall as well, no luck
9.I've named the ports through firewall as MSSQL with tcp port number as 1433 and UDP as 1434.
10.I've given all users under security in mangement studio all rights to the database.

As you can see, I have tried everything possible. I still get the error message though. WHAT AM I MISSING HERE?

Please help. I'm at a stage where I am considering moving to MySql. It is only that i've spend so much money and time on sql server already.

Some links i've tried.

http://msdn.microsoft.com/en-us/library/ms165724(SQL.90).aspx
http://msdn.microsoft.com/en-us/library/dd207004.aspx WITH ALL LINKS FROM THERE...
http://www.connectionstrings.com/sql-server-2008
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx WITH ALL LINKS FROM THERE ....
http://blogs.msdn.com/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx WITH ALL....
http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx AS WELL AS PART 2....
http://blogs.msdn.com/sql_protocols/
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/c488cf76-2515-440f-b3f8-9cfad689c5b6/
http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=105
http://en.wikipedia.org/wiki/Microsoft_SQL_Server
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=378&lngWId=5 WITH ALL LINKS...

AS WELL AS TONS OF POSTS FROM THIS FORUM.
As you can see, i've done a lot of research, but can still not solve this.

Recommended Answers

All 5 Replies

Okay, I normally use SQL Server Authentication but presently surrounded by machines with no SQL Server so this is from memory...

Start SQL manager (MMC?) (on the server). Connect to the instance that you eventually want to connect to. Connect to the database and if you right click??? I think you should be able to add a user there. Give them read/write/modify/etc. access.

Now, while you are there start query analizer (sp?) and use the login you just created and hopefully you should have your database listed in the combobox at the top...

Now, from XP machine where you are having trouble. First try to create an ODBC DSN (Admin tools? ODBC Data Source) to see if you can connect. I'm betting that you don't acutally have the correct driver on your system for the DSN Less connection you are trying to create, which means you will have in instal a MDAC from MS.

Okay, so you can connect, now rebuild your connection string from the info provided a connectionstrings.com, but be sure that you have the correct template for sql auth...

Good Luck

(I think you should be able to add a user there. Give them read/write/modify/etc. access.)

All access granted to database already.

(Now, while you are there start query analizer (sp?) and use the login you just created and hopefully you should have your database listed in the combobox at the top...)

I have not tried this yet. Will do so and get back to you, thanks

(Now, from XP machine where you are having trouble. First try to create an ODBC DSN (Admin tools? ODBC Data Source) to see if you can connect. I'm betting that you don't acutally have the correct driver on your system for the DSN Less connection you are trying to create, which means you will have in instal a MDAC from MS.)

MDAC 2.8 installed. My system is updated daily including vb, office, xp etc.

Okay, so you can connect, now rebuild your connection string from the info provided a connectionstrings.com, but be sure that you have the correct template for sql auth...

Good Luck

Thanks again. Will try above.

It seems that my problem lies within domain naming properties. I need to set up a domain name and use MS Server 2003 and not XP. Server 2003 will then authenticate all users loging in. I'm going to give this a try.

how you solved this problem ? please explain

Hi, I am new to programming but I am trying to develop a login form that needs verified against a login/user of SQL 2008

I can get the code to verify the USERNAME as it is not encrypted but what I am unable to do is verify the PASSWORD as this is encrypted.

This is my code:

 Users_string = _
            "SELECT name, sid " & _
            "FROM SYS.SQL_LOGINS " & _
            "WHERE default_database_name = 'TAPOS' and Name = @name AND password_hash = @password "

        Users_command = New SqlClient.SqlCommand(Users_string, SQLCon)

        Users_command.Parameters.AddWithValue("@name", txtUsername.Text)
        Users_command.Parameters.AddWithValue("@password", txtPassword.Text)

        Dim da As New SqlDataAdapter(Users_command)
        Dim dt As New DataTable


        da.Fill(dt)

        If dt.Rows.Count = 1 Then
            MsgBox("Login Good")
        Else
            MsgBox("Logn Failed")

can anyone help me??

Thanks in advance for your help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.