Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Creating a login in the SQL Server instance

Author  Topic 

rafael.soteldo
Starting Member

36 Posts

Posted - 2014-02-11 : 08:59:19
Hi there:

I'm trying to develop applications that have the database on one machine and the application interface on other machines over a network.

I'm studying WCF to accomplish this.

I'm using VS2012, SQL Server Express 2012, and Windows 7 Ultimate x64 with IIS7.

In the WCF Documentation are instructions aimed at having Sql Server enable IIS to connect to the SQL Server instance.

One of those is:

CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS;
GO

The documentation says that it creates a login in the SQL Server instance for the Windows account used to run IIS. This enables IIS to connect to the SQL Server instance.

I tried it in my instance of Sql Server Management Studio 2012 and I receive this error:

quote:
Msg 15401, Level 16, State 1, Line 1
Windows NT user group 'NT AUTHORITY\NETWORK SERVICE' not found. Check the name again.


I already installed WCF on Windows and registered aspnet, using the command prompt with Administrator privileges.

What could I be doing wrong here?

Thanks in advance for your time

-------
Rafael Soteldo

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-02-12 : 07:32:27
http://support.microsoft.com/kb/324321/en-us

Javeed Ahmed
Go to Top of Page

rafael.soteldo
Starting Member

36 Posts

Posted - 2014-02-12 : 07:45:18
quote:
Originally posted by ahmeds08

http://support.microsoft.com/kb/324321/en-us

Javeed Ahmed



Hi,

Thank you for answering,

This page won't open and it tells me that the information is encrypted

Thanks in advance for your time

-------
Rafael Soteldo
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-02-12 : 07:48:18
below is the content from the page:
You may see the following error when you add a Microsoft Windows NT user or a Microsoft Windows NT group as a login to Microsoft SQL Server, or when you move logins from a server in one domain to a server in a different domain:
Error 15401: Windows NT user or group '%s' not found. Check the name again.
This step-by-step article discusses potential causes of the error and how to troubleshoot this problem.

The login does not exist

Verify that the Windows login still exists in the domain. Your network administrator may have removed the Windows login for specific reasons, and you may not be able to grant that login access to the SQL Server.
Verify that you are spelling the domain and login name correctly and that you are using the following format:
Domain\User
If the login exists, and it is correct, and you still receive the error, continue with the following sections in this article.
Duplicate security identifiers

In a Windows domain, unique Security Identifiers (SIDs) are automatically assigned to Windows logins in the domain. When you add a Windows login as a SQL Server login, the SID is stored in a system table in SQL Server. If you try to add a new login which has the same SID as an existing SQL Server login, the 15401 error occurs.
Note In SQL Server 2005, duplicate SIDs are not allowed.
To determine if this is the cause of your error, run the following code against the Master database while you are logged on to SQL Server as a member of the sysadmin role:
SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomain\YourLogin')
If a row is returned from this query, a duplicate SID is the cause of your problem.
One potential cause of this scenario is loading a master database from a server in another domain. One of the logins in that domain may have had the same SID as the login that you are trying to add in this domain. This might also occur in an environment where you have clone or ghost systems.
You must use sp_revokelogin to drop the login with the matching SID, or, to keep the existing logins, correctly map the logins from the old domain to logins in the new domain. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
314546 How to move databases between computers that are running SQL Server
Authentication failure

You might receive error 15401 when the domain controller for the domain where the login resides (the same or a different domain) is not available for some reason.
If the login is in a different domain than the SQL Server, verify that the correct trusts exist between the domains.
Verify that the domain controller of the login is accessible by using the ping command from the computer that is running SQL Server. Check both the IP address and the name of the domain controller.
For more information about ping command, click the following article number to view the article in the Microsoft Knowledge Base:
102908 How to troubleshoot TCP/IP connectivity with Windows 2000 or Windows NT
Case sensitivity

You may be experiencing case-sensitivity problems, which are described in the following Microsoft Knowledge Base articles:
245768 Case-sensitive Unicode collating sequence and Windows NT logins
In this case, use the sp_configure or sp_helpsort stored procedure to determine if the sort order or collation of your instance of SQL Server is case sensitive. If the server is case-sensitive, follow the steps in the referenced article (Q245768) to successfully add the login.

2770837 FIX: "Windows NT user or group 'Domain_name\User_name' not found" error message when you add a login to a case-sensitive SQL Server 2008 instance
In this situation, an issue occurs when you try to add a Microsoft Windows NT user or group as a login to SQL Server 2008. If the server is case-sensitive, see the "Resolution" section in update 2770837.

Local accounts

Local (non-domain) accounts require special handling. If you are trying to add a local account from the local computer that is running SQL Server, view the following Microsoft Knowledge Base article for the correct steps:
322988 sp_grantlogin "NT AUTHORITY\SYSTEM" fails on Microsoft Windows NT 4.0
To add the Local System Account as a SQL Server login on Windows NT 4.0, view the procedure in the article Q322988 in the Microsoft Knowledge Base.
When you add predefined local groups, you must use BUILTIN as the domain.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
216808 Use BUILTIN\Group to grant access to predefined Windows NT groups
Name resolution

If you have problems resolving the name of a computer that is involved in adding the login or group, you might receive error 15401.

Verify that your name resolution mechanism (such as, WINS, DNS, HOSTS or LMHOSTS) is configured correctly.

Back to the top | Give Feedback
Collapse imageProperties
Article ID: 324321 - Last Review: November 27, 2012 - Revision: 7.0
Applies to
Microsoft SQL Server 2000 64-bit Edition
Microsoft SQL Server 2000 Standard Edition
Microsoft SQL Server 7.0 Standard Edition
Microsoft SQL Server 2005 Standard Edition
Microsoft SQL Server 2005 Express Edition
Microsoft SQL Server 2005 Developer Edition
Microsoft SQL Server 2005 Enterprise Edition
Microsoft SQL Server 2005 Workgroup Edition
Keywords:
kbhowtomaster KB324321


Javeed Ahmed
Go to Top of Page

rafael.soteldo
Starting Member

36 Posts

Posted - 2014-02-12 : 10:15:44
Hi Ahmed:

I can't use the information in that page, I guess that the section "Local Accounts" could be related to my problem, but redirects the reader to article Q322988 in the Microsoft Knowledge Base.

I simply want to create a Login for NT AUTHORITY\NETWORK SERVICE in SQl Server Management Studio 2012 by using the command: "CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS;"

Thanks in advance for your time

-------
Rafael Soteldo
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-02-13 : 05:50:43
is your windows running on English language or any other language?

Javeed Ahmed
Go to Top of Page

rafael.soteldo
Starting Member

36 Posts

Posted - 2014-02-13 : 09:37:46
quote:
Originally posted by ahmeds08

is your windows running on English language or any other language?

Javeed Ahmed



It's spanish, although I changed it to english, apparently some internals are still in spanish.

For example, I discovered that Network Service is Servicio de red, I was able to use it then

Thanks in advance for your time

-------
Rafael Soteldo
Go to Top of Page

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2014-02-13 : 15:59:22
If you are going to go with integrated security, you simply need to create a login, and database access for that login.

You can do so with SSMS easily (I recommend installing it if you haven't then just export the query so you can see what it is doing.)
http://databases.about.com/od/sqlserver/ht/Creating-A-Sql-Server-2008-Database-Account.htm


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-02-14 : 05:56:20
can you try this
CREATE LOGIN [NT-AUTORITÄT\NETZWERKDIENST] FROM WINDOWS

Javeed Ahmed
Go to Top of Page
   

- Advertisement -