I'm not asking how to change the user's login, which is doable with sp_change_users_login, but really the user's name (which comes under the Name column of the list of users in Enterprise Manager).

Is there a stored procedure to do it? Some other command?

link|improve this question
What "list of users"? Are you trying to change the login name at the server level, or the user name within a database? These are two different things that are often the same but don't need to be. – Aaron Bertrand Mar 12 at 20:16
I recommend the DBA stack. – pst Mar 12 at 20:18
Hey @AaronBertrand. I figured you might pick this up. I don't mean the login. I mean a user name within a database. – MPelletier Mar 12 at 20:21
Oh, but I wish there was a move to dba option now... – MPelletier Mar 12 at 20:37
Well you could always delete your question and create one there. Did you try the answer I posted? I suspect it wasn't valid in 2000 (since that was before the major schema shift in 2005) but thought I would throw it out there just in case. – Aaron Bertrand Mar 12 at 20:38
show 1 more comment
feedback

migrated from stackoverflow.com Mar 14 at 14:48

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

I don't have a 2000 instance handy to test right now, but could it be as simple as:

ALTER USER foo WITH NAME = bar;

(I honestly forget if this syntax was valid in SQL Server 2000.)

link|improve this answer
That's the thing, in SQL Server 2000 I get "Incorrect syntax near the work 'USER'." – MPelletier Mar 12 at 20:38
Yeah I wasn't too confident it was valid then. You may have to drop the user and re-create them. – Aaron Bertrand Mar 12 at 20:39
Yeah, I'll just drop 'em. It really doesn't seem supported in 2000. – MPelletier Mar 12 at 20:46
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.