FIX: "Login Failed for User 'SYSTEM'" Error When You Use OPENROWSET Function Without UserName (817845)



The information in this article applies to:

  • Microsoft Data Access Components 2.7
  • Microsoft SQL Server 2000 (all editions) SP3

SYMPTOMS

When you run a query with the OPENROWSET function, and you do not specify the username and password in the function, you receive the following error message:
Login failed for user 'SYSTEM'

CAUSE

An authenticated standard SQL user who executes ad hoc queries in SQL server, and does not specify a username and a password (or an application that runs over Microsoft SQL OLE DB Provider, and does not specify a username and a password), can cause a connection to occur that has SQL Server Service account as the username, and has a blank password. Therefore, when the SQL Server Service is running under the SYSTEM account, you receive the error message that is listed in the "Symptoms" section that specifies "SYSTEM" as the user.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in MDAC 2.7 Service Pack 1 Refresh.

MORE INFORMATION


Steps to Reproduce the Behavior

  1. In SQL Query Analyzer, run the following statement:
    select * from openrowset('sqloledb','';;,'select * from pubs.dbo.authors')
  2. You receive the error message that is described in the "Symptoms" section of this article.

RESOLUTION

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

269587 INF: Windows Authentication is the Default Security Mode After a SQL Server 2000 Typical Installation


Modification Type:MajorLast Reviewed:4/6/2004
Keywords:kbServer kbUser kbQuery kbService kbbug KB817845 kbAudDeveloper