title: How to create a SQL Server login for a service account on a non-English Windows?
body: <p>Given a Windows Server 2008 R2 system, where the service accounts use a non-English display language, with SQL Server 2008, the following Transact-SQL statement fails:</p>
  
  <pre><code>CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS ...
  </code></pre>
  
  <p>with the following error:</p>
  
  <blockquote>
    <p>Windows NT user or group 'NT AUTHORITY\NETWORK SERVICE' not found. Check the name again.</p>
  </blockquote>
  
  <p>(or the same message in the non-English display language for the service accounts, depending on the context).</p>
  
  <p>This same statement succeeds if the service accounts use English as their display language.</p>
  
  <p>The reason seems clear: on, e.g., a German system the display name for this account is <code>NT-AUTORITÄT\NETZWERKDIENST</code>, and the name <code>NT AUTHORITY\NETWORK SERVICE</code> (with a space) is not recognized.  Also the non-localized name <code>NT AUTHORITY\NETWORKSERVICE</code> (no space) does not work.</p>
  
  <p>My question: How should I rewrite the above statement so that it works irrespective of the display language?  Or am I forced to find out the localized name (in InstallScript in my case)?  Then I can use</p>
  
  <pre><code>CREATE LOGIN [NT-AUTORITÄT\NETZWERKDIENST] FROM WINDOWS
  </code></pre>
  
  <p>which <em>does</em> work...</p>