x

How to rename domain accounts in SQL

Hi, I am trying to copy logins from one server to other and I need to rename the login's(domain accounts) on the second server.when I tried to rename I am getting the below error .What is the best approach for this.
"Msg 15151, Level 16, State 1, Line 1 Cannot alter the user 'RB\W439365', because it does not exist or you do not have permission."
more ▼

asked Feb 15, 2012 at 05:19 PM in Default

srivivek gravatar image

srivivek
519 41 42 43

If an answer is helpful, make sure you vote it up by clicking on the thumbs up symbol next to it. If an answer solves the issue, be sure you mark it by clicking on the check box next to it.
Feb 08, 2013 at 03:22 PM Grant Fritchey ♦♦
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

A domain account has to be renamed at the domain level.

Are you looking to create an alias for the name? Is the server in a different domain? I'm not clear on why you want to rename them.

The benefit of domain accounts is that the same one is used on any authorized system in the environment.
more ▼

answered Feb 15, 2012 at 06:20 PM

Blackhawk-17 gravatar image

Blackhawk-17
11.9k 28 31 36

one server is DEV and and other server is IST,our company policy is the account names should be different in both environments.
Feb 15, 2012 at 06:31 PM srivivek
Then you will require new domain accounts for the DEV environment to associate with the database users.
Feb 15, 2012 at 06:45 PM Blackhawk-17

To follow company policy you would have to create different accounts at the domain level for each user, then add those to the instance.

I can understand having different accounts for administrative purposes but not really for developers. If you have a large number of accounts already, you are talking about doubling that which is going to be a lot of overhead to maintain. I would instead restrict their access by using Windows Groups assigned to the dev and production instances. Just my opinion.
Feb 15, 2012 at 06:54 PM Shawn_Melton
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1

asked: Feb 15, 2012 at 05:19 PM

Seen: 783 times

Last Updated: Feb 08, 2013 at 03:22 PM