Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: Yesterday @ 6:36 AM
Points: 228, Visits: 793
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 @ 4:31 PM
Points: 12,881, Visits: 31,815
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
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: Yesterday @ 6:36 AM
Points: 228, Visits: 793
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: Today @ 2:02 PM
Points: 7,081, Visits: 12,574
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: Yesterday @ 6:36 AM
Points: 228, Visits: 793
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: Today @ 2:02 PM
Points: 7,081, Visits: 12,574
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