Simple Solution to Common Problem

  • Only my DEV servers are in the same domain I am normally logged into. Production servers reside in a different domain. So for years I would just RDP to a machine on the correct domain and then launch SMSS to connect to my production machines. I have no idea why I haven't looked for a solution sooner...maybe it's because connecting to a remote machine wasn't all that horrible. Regardless, I did some searching today for shizzles and found a nice simple solution that works!

    Problem:

    Connect SMSS to a remote server on a different domain.

    Solution:

    Open up the command prompt and type the following. (point the path to your smss.exe)

    C:\Windows\System32\runas.exe /netonly /user:yourDomain\yourUserName "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"

    I've since just created a shortcut to make it even easier.

    I'm curious to hear from folks that might have run into similar situations. Have you ever lived with a workaround/problem only to find out there was a simple solution?


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Nice solution and I've bookmarked it in case I ever need such a thing. I've just never needed such a thing... yet.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Very nice, simple and straightforward.

    I've never had the need for it, but there is talk about moving out SQL Servers to a different domain. It scares me. I'm thinking the only safe approach is to spin up new hardware in the new domain and then migrate the databases one by one. It'll be slower, but also safer and will give me a fallback position. If this does happen, I'm sure this post will come in very handy, so thank you for posting it.

  • Current shop has everything in one domain but issues admins a second Windows account for use in the prod region. I basically did the same as you, created a shortcut to runas that launches SSMS with my prod-account. Over the course of many SSMS launches I can't imagine how many hours it has saved, a handful of seconds at a time.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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