Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Windows NT user or group '%s' not found. Check the name again. Expand / Collapse
Author
Message
Posted Friday, May 24, 2013 3:13 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, June 6, 2016 6:44 AM
Points: 243, Visits: 916
I'm having a problem creating Users in a database. It's a similar issue to this KB http://support.microsoft.com/kb/324321/en-us

However I'm doing it WITHOUT LOGIN, and these users that are giving me issues are not Logins that exist on this instance. All of the reads I found assume that you want to create the user with an associated login. I'm not sure why it's even checking to see if see if it exists if I'm specifying WITHOUT LOGIN. I am attempting to script a copy of our production database locally. Script is simply:


CREATE USER [domainname\username] WITHOUT LOGIN
GO
Post #1456693
Posted Friday, May 24, 2013 3:15 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 14,407, Visits: 37,679
you can only create a SQL user without login;

so CREATE USER [ClarkKent] WITHOUT LOGIN is fine and will work;

but if you put in a slash in the name, a windows user/group is assumed,and that's what is failing


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1456694
Posted Friday, May 24, 2013 3:23 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, June 6, 2016 6:44 AM
Points: 243, Visits: 916
Lowell (5/24/2013)
you can only create a SQL user without login;

so CREATE USER [ClarkKent] WITHOUT LOGIN is fine and will work;

but if you put in a slash in the name, a windows user/group is assumed,and that's what is failing


That can't be true 100% of the time because most of the usernames with slashes are being added just fine. There are about a half dozen or so (out of like 100) users that are giving that error, and there doesn't seem to be an obvious reason why those are failing and the rest aren't.
Post #1456701
Posted Friday, May 24, 2013 7:43 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 4:38 PM
Points: 7,917, Visits: 14,266
I'm curious why you would want to include a backslash in a user WITHOUT LOGIN. Seems to me you're asking for trouble on multiple levels by doing it that way.

Anyway, it is interesting that you would get that error when specifying WITHOUT LOGIN. Any pattern to it?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1456751
Posted Friday, May 24, 2013 7:51 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, June 6, 2016 6:44 AM
Points: 243, Visits: 916
opc.three (5/24/2013)
I'm curious why you would want to include a backslash in a user WITHOUT LOGIN. Seems to me you're asking for trouble on multiple levels by doing it that way.

Anyway, it is interesting that you would get that error when specifying WITHOUT LOGIN. Any pattern to it?


Im using a redgate sql compare script to create a local db copy. However it wants to create logins for each user, and Id rather figure out a way to script it so that it doesnt depend on anything outside of the database.
Post #1456752
Posted Friday, May 24, 2013 8:29 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 4:38 PM
Points: 7,917, Visits: 14,266
I do not have it in front of me to check but if you go to options in your SQL Compare project you should be able to exclude the checking of Database Users.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1456756
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse