Changing windows authentication Domain name to connect to SQL Server

  • Can someone tell me if it is possible to change the domain name of my user account (windows auth) in SQL Server 2008?

    Ex: <DomainName>\LoginId

    If yes, how can this be changed?

    The scenario where this is needed is as follows: I am a consultant and have a (consulting) company laptop which has SQL Server 2008. I am working at a client site where i need to connect to a SQL Server that is on a different domain - <ClientDomain>

    The Client site DBAs told me that they have given me permissions and placed my login under a group and that the group has appropriate permissions to login via windows auth. But, when i try to connect i get an error: "This login is from an untrusted domain and cannot be used with windows auth"

    So, basically i want to be able to change the windows auth. connection from <myConsultingCompanyDomain>\LoginId to <ClientSiteDomain>\LoginId

    .. Is this possible ?

    Note: I was on the Client network (VPN) when i tried to connect.

    Appreciate the help.

  • If your laptop happens to be where it can run the domain account they use (highly unlikely), you would use the RunAs option (right-click on SQL Server Management Studio) and specify the account you've been given.

    If your laptop can't do that (very likely, and the best practice from their perspective), you'll need to drop to a command prompt and use the RunAs command, but with the /netonly switch.

    RunAs command

    So, for instance:

    runas /netonly /user:ClientDomain\Login ssms.exe

    K. Brian Kelley
    @kbriankelley

  • I will try that out today at my client visit. I was not aware of this runas capability. Thanks Brian.

Viewing 3 posts - 1 through 2 (of 2 total)

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