SYSTEM_USER returns old username

  • We are currently renaming all of our domain users (they are still in the same domain)

    The problem is that after renaming a user SYSTEM_USER still returns the old name. It will give the new (proper) name after restarting the sql-service.

    Are there any less drastic ways of forcing sql server to update it's usernames? 😉

    Many thanks in advance!

  • you can use the ALTER LOGIN command, i believe.

    --name change due to marriage

    ALTER LOGIN [DOMAIN_NAME\gallan] WITH NAME = [DOMAIN_NAME\gshepherd];

    --domain name change?

    ALTER LOGIN [DOMAIN_NAME\lowell] WITH NAME = [NEW_DOMAIN\lowell];

    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!

  • Thank you for your quick reply!

    Unfortunately the user is not sql user but he is in a active directory group. And that group is created as a login in SQL Server.

  • Unfortunately, it can take a while for AD changes to propagate to whatever SQL Server is using to Cache it. It have seen it take up to 24 hours for this to get straightened out.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Thank you!

    Too bad that there is not a way to force to renew it's cache other than restarting sql services.

    🙁

  • bjorn.hilde (3/8/2010)


    The problem is that after renaming a user SYSTEM_USER still returns the old name. It will give the new (proper) name after restarting the sql-service.

    Is this problem get resolved ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • No unfortunately not. I still need to restart the sql services to let sql server update it's cache.

  • bjorn.hilde (3/10/2010)


    I still need to restart the sql services to let sql server update it's cache.

    your are peroidically restarting the services ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Yes, we have scheduled that to do that overnight, until we have renamed all the users..

  • if possible restart sql server.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Hi,

    We are having the same problem, but it involves the renaming of a single user in Active Directory.

    Do we still need to restart the SQL instance to get this fixed?

    Would removing the user from Active Directory and recreating it from scratch fix it as well?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Hi

    Did you solve this? Im reluctant to restart SQL Server

Viewing 12 posts - 1 through 11 (of 11 total)

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