The SQL Network Interface library was unable to register SPN. Error: 0x490

I recently installed SQLExpress Beta 2 on WinXP.

After power up and logon there is a substantial delay - minutes - sometimes maybe forever.

In the event viewer I see:

"The SQL Network Interface library was unable to register SPN. Error: 0x490"

This is on my home network with two computers one using WinXP the other Win2000 configured as a workgroup.

I say maybe forever because if I tire of the wait and hit system reset - after the reboot this delay does not occur.

What can I do (beyond uninstalling SQLExpress - which does work to eliminate the delay) to stop this probem





Answer this question

The SQL Network Interface library was unable to register SPN. Error: 0x490

  • QuantumArchitect

    Hello,
    Many thanks for youre response. Will check the cached connection info.
    Regards,
    Avinash

  • VBScriptor

    Hi avinashraj.

    The SPN wouldn't be the source of the problem that you're seeing.  Often on XP SP2 the issue is related to the firewall.  As an experiment, have you tried turning the firewall off to see if the problem still exist

    As for the first connection failing and subsequent connections succeeding, one potential cause is the cached last connect information.  If you're connecting to a named instance and not specifying a port, then the client will determine the port by querying SQL Browser on the server.  Once a connection succeeds, then this port number will be cached in the registry to speed up future connections.  However, if the connection information changes, e.g., the server is using dynamic ports and is restarted, then the first connection may fail.  A failed connection will clear the cache and that is why the subsequent connection will succeed.

    Il-Sung Lee
    Program Manager, SQL Server Protocols

    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights



  • KTaylor

    Hi KerryK,

    The message in the error log that you're seeing in quite normal.  Whenever SQL Server starts, it attempts to register its Service Principal Name (SPN) with the domain controller in Kerberos authentication will be used.  In your case, since you're using standalone machines, the registration will fail and the messages that you see will be logged.  The end effect is that Kerberos authenticaiton will not be available, but the server will otherwise operate normally.

    I'm not certain that the attempt to register a SPN is the source of the delay that you're seeing.  Certainly it would contribute to it at least a bit as the APIs called to register the SPN will search for the domain controller.  Do you see any other errors in your error log when you start the server

    Is there a reason why you start the SQL Server Express instance at boot time   If you don't always need it started, then I would just suggest that you use the SQL Server Configuration Manager to change the service startup to Manual instead of Automatic.  Then you won't have this delay every time your reboot.

    Thanks,

    Il-Sung Lee
    Program Manager, SQL Server Protocols

    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights



  • 204198

    Thanks for the response.  I did change startup to manual and that fixed the long delay.

    The reason SQL Server Express was being started at boot time was that's the way it installs.  

    It took me some time to find out what was causing the delay problem since I did not initially associate it with SQL Server.   Because I wouldn't see the delay if I did a hardware reset/reboot I thought it must be some sort of hardware problem.



  • push_ebx

    Hi,

    I am currently building a desktop app with SQL express as the database. The db file is put inplace by a file copy operation and is placed with in a folder within the "Application Data" special folder.

    Our connection string specifies integrated security and also the db file path to use.
    All is well in our dev environment and a few client installs. But on a few other cleint installs, we see a "Connection Time Out" exception thrown when the app is started for the first time after a re-boot of the machine. Run the app again and it works like a charm. So its only the first time that is an issue. And after reboot that is.

    All our deployments and dev environment machines run xp-sp2. Essenatially, the machines on which we see issues also run XP SP2. Additionally we see the "unable to register SPN" message being logged on those machines. (Also we use .net Beta 2 from a while ago. Will that matter )

    I thought that the "unable to register SPN" issue was causing the time out. On one of our dev machines, I've created a local user who is not a member of the admin group. The app runs fine using this login. But I see the SPN message in the event log. The SPN message is expected I think in this scenario. (so I've read on your blog + MS site etc....)

    So, I suppose this is not what is causing the time out. But then again eveything else seems fine.

    Any help with ideas/suggestion on how the time out issue can be addressed will be great.

    Thanks and regards,
    Avinash

  • Roger Jennings

    Hello,

    The "connection time out" for the very first time after a restart issue has surfaced again. I was going through your response and was trying to trouble shoot the problem.

    Regarding your cached connection info advise - I'm not using a remote sql express. It is running on the local machine and is only a problem with some clients. I'm running a standard install and have not made any changes.

    while connecting to a local instance will the idea still be valid

    my connection string looks like -->

    "Integrated Security=True;User Instance=True;Data Source=.\SQLExpress;AttachDBFilename=<%USERS_LOCAL_FOLDER%>;"

    Any help will be great.

    Thanks,

    Avinash


  • The SQL Network Interface library was unable to register SPN. Error: 0x490