Home > Archive > MS SQL Server > November 2006 > how do I add a user?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how do I add a user?
Middletree

2006-11-29, 7:13 pm

Seems like such a simple thing. But I am pulling my hair out.

Using SQL Server 2000, SP4, on Windows 2000 Server.

I'm moving an ASP-built web app from one machine to another. It works on the
old one, not on the new. Specifically, the error I get is:

Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'XXX'.

(where I replaced the login name with X's.)


So I am looking on the old machine (the one that works) and the new one, to
see what differences I notice, and sure enough, in the old one, under Users,
I see the user called XXX. So I go to my new one, which doesn't have a user
by that name, and I attempt to add it. But it doesn't let me add it. In
fact, I am not sure how to add it. I right-click on Users, and try to fill
in the user name but it says that that user doesn't exist, so I can't add
it. Which is ridiculous. I mean, how does any user exist if you don't get a
chance to add them?




Tracy McKibben

2006-11-29, 7:13 pm

Middletree wrote:
> Seems like such a simple thing. But I am pulling my hair out.
>
> Using SQL Server 2000, SP4, on Windows 2000 Server.
>
> I'm moving an ASP-built web app from one machine to another. It works on the
> old one, not on the new. Specifically, the error I get is:
>
> Microsoft OLE DB Provider for SQL Server (0x80040E4D)
> Login failed for user 'XXX'.
>
> (where I replaced the login name with X's.)
>
>
> So I am looking on the old machine (the one that works) and the new one, to
> see what differences I notice, and sure enough, in the old one, under Users,
> I see the user called XXX. So I go to my new one, which doesn't have a user
> by that name, and I attempt to add it. But it doesn't let me add it. In
> fact, I am not sure how to add it. I right-click on Users, and try to fill
> in the user name but it says that that user doesn't exist, so I can't add
> it. Which is ridiculous. I mean, how does any user exist if you don't get a
> chance to add them?
>
>
>
>


You have to first create a LOGIN, then map that LOGIN to a database as a
USER. When you moved the database from the old server to the new, how
did you do it? If you did a backup/restore, you'll have to first drop
the user from the database before mapping the login. The user SID (an
internal ID) is stamped in the database referencing the user from the
original server.


--
Tracy McKibben
MCDBA
http://www.realsqlguy.com
Middletree

2006-11-29, 7:13 pm

I did a detach/reattach.

Your suggestion worked. Thanks!


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com