SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Windows NT user or group '%s' not found. Check the name again.


Windows NT user or group '%s' not found. Check the name again.

Author
Message
Gabriel P
Gabriel P
SSC-Addicted
SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)

Group: General Forum Members
Points: 428 Visits: 947
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
Lowell
Lowell
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29026 Visits: 39984
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!

Gabriel P
Gabriel P
SSC-Addicted
SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)

Group: General Forum Members
Points: 428 Visits: 947
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.
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15291 Visits: 14396
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
Gabriel P
Gabriel P
SSC-Addicted
SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)SSC-Addicted (428 reputation)

Group: General Forum Members
Points: 428 Visits: 947
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.
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15291 Visits: 14396
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search