odbc sql cannot generate sspi context (1 Viewer)

nector

Member
Local time
Today, 18:35
Joined
Jan 21, 2020
Messages
367
I'm having this "odbc sql server cannot generate sspi context error", but if I try to ping the IP address of the remote server I'm able to get a reply, even seeing/editing the shared folders from the server I have no problem. Now when I login in the Sql server instance I cannot see the window network users except the host. By the way I.m trying to connect by using a router which is just the same as the normal internet.

(1) I made sure that TPC/IP address is enabled and a static port 1433 is inserted on All IPV under TPC/IP field
(2) I restarted the SQL server under services after the above changes for it to take effect
(3) I enabled the window fire wall and also set the new bound rule and attached the static port 1433
(4) Under services I made sure that the SQL browser is added and running on automatic
(5) I have also allowed the remote connection in the Sql Server Studio Management

The fact that I cannot see the network users or the directory then its not possible for me to add/grant users permissions to my database called Accounting

Below is my Less DNS File ODBC string which I composed to connect to the SQL database:

Code:
Private Sub Form_Open(Cancel As Integer)
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
If Len(tdf.Connect) > 0 Then
tdf.Connect = "ODBC;DRIVER=SQL Server; " & _
"SERVER=NECTORPRIME\SQLExpress;DATABASE=Accounting;Trusted_Connection=Yes"
tdf.RefreshLink
End If
Next tdf
Set tdf = Nothing
Set dbs = Nothing
If (Date > #12/31/2022#) Then
MsgBox "Your database has expired contact the developer." & vbCrLf & "Please contact us at our official email address" & vbCrLf & "or at 260977352401 for the latest version.", vbInformation + vbOKOnly, "Subscription Expired!"
Cancel = True
Application.Quit
Exit Sub
End If
End Sub
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:35
Joined
May 7, 2009
Messages
19,227
why do you need to Recreate the Link? is the server using dhcp?
i may be wrong, but the way i do it is delete old link (table) and re-create it.
if you Enabled IP addressing then you can use the server IP to connect.
 

Minty

AWF VIP
Local time
Today, 16:35
Joined
Jul 26, 2013
Messages
10,367
Have you tried a different SQL Driver ? That is an ODBC related error.
What version of SQL server is this?
 

nector

Member
Local time
Today, 18:35
Joined
Jan 21, 2020
Messages
367
I'm currently using ODBC 13.1 , the reason being ODBC 17 to 19 were rejected as not coming from a trusted source. I'm equally surprised the same ODBC 13.1 works very well under SQL 2016 but 2019 SQL server I do not know what is the issue
 

nector

Member
Local time
Today, 18:35
Joined
Jan 21, 2020
Messages
367
Correct me if I'm wrong here! Do I have to install also the same ODBC version on all the work stations, probably that is the reason why I'm receiving this message?
 

Minty

AWF VIP
Local time
Today, 16:35
Joined
Jul 26, 2013
Messages
10,367
The latest version is 18 available directly from Microsoft here

I use version 17 on everything, and yes it will need to be installed on every machine you use, if you specify the driver in a connection string.
 
Last edited:

Auntiejack56

Registered User.
Local time
Tomorrow, 01:35
Joined
Aug 7, 2017
Messages
175
You might be able to get a clue about this by going to the microsoft doco regarding the Kerberos Configuration Manager.

This error means that SSPI tries but can't use Kerberos authentication to delegate client credentials through TCP/IP or Named Pipes to SQL Server. In most cases, a misconfigured Service Principal Name (SPN) causes this error.

If you have a spurious SPN on the server, then there are ways to fix or remove it. I have zero-raised-to-a-mighty-power experience in this, but a download of the Kerberos Configuration Manager might point you to a simple permanent fix.
 

Isaac

Lifelong Learner
Local time
Today, 08:35
Joined
Mar 14, 2017
Messages
8,774
Blame the latest Windows update, that's what we usually do :LOL::LOL:
 

nector

Member
Local time
Today, 18:35
Joined
Jan 21, 2020
Messages
367
I'm currently using windows 11

SQl Message.png
 

Users who are viewing this thread

Top Bottom