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

  • 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

  • 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!

  • 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.

  • 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

  • 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.

  • 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

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply