Can''t Log on to SQL Server - "null user name"

  • I have 2 Windows XP Pro desktops which connect to a database on a server running SQLServer using Windows Authentication. I have been trying to connect a laptop to the same database but get an error message saying that authentication failed because of a null user name. I log on to the laptop with the same user name and password that I use successfully on the desktop but I am unable to connect to the database. Furthermore, on the laptop, when I try to open a mapped network drive (F which resides on the server, I have to enter a user name (\\OFFICESERVER\username&nbsp and password before I get access to F:. On the 2 desktops, F: is accessible as soon as I boot-up.

    I know that this sounds more like a Windows network issue than SQL Server issue but I am stumped. Thank you in advance.

  • This is almost certainly a Windows network authentication problem.

    You will need to talk to your Infrastructure people to find out if you have authority to connect to the server from your laptop or desktop, and also how this is enforced.  If enforcement is via a Group Policy Object (GPO) then this will need changing before your connection will work.

    If a GPO is not involved, look at the User Rights on the server.  Your account may need the 'Access this computer via the network' right.  Also, SQL on your server must run using a domain service account.  If it is using local system authority or a local account, it will not be able to access the domain resources needed to authenticate domain users. 

    If you are running W2003, in addition to all the rights mentioned in BOL, the service account will need the 'Impersonate client after authentication' right - this is documented in a KB.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • How do I look at the user rights on the server? The server runs Windows 2000 and is not on a domain. The 2 desktops are in a workgroup (not a domain) with the server and access SQL Server.  

  • Thanks for your suggestion. I did 3 other things which solved the problem. I connected to the network drive before connecting to the SQL database, I removed TCP/IP as a protocol from SQL Server (using only named pipes) and I installed SQL Server SP3. I am not sure if I needed SP3 but I clearly needed the 2 other things.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply