0

Typically I remote into a machine with IP Address 00.00.00.00 and then I have an account in a domain, let's call it myspecialaccount\firstname.lastname.

Then I use Windows auth to connect to SQL Server instance for example:

ABCLACSQLC123\DEV04A

So my question is HOW can I connect from my laptop through SSMS directly to the machine (pending ports are open etc..)

Amir Keibi
  • 1,991
  • 28
  • 45
Tom Stickel
  • 19,633
  • 6
  • 111
  • 113
  • If not on the same domain, then create a database user with proper rights, then just use the ip in SSMS with that users credentials. – Allan S. Hansen Feb 25 '15 at 06:42
  • What protocols does the MS SQL server use for communication? Named pipes, TCP/IP or both? Do you have administrative access to any firewall (hardware or software) that might be blocking outside communication and requires reconfiguration? Have you considered VPN as an alternative? –  Feb 25 '15 at 06:44
  • I'm not on the same domain, CORP domain is laptop, then I remote in with Services domain. I don't think that I would have any permissions to be able to add /change protocols, nor create a user etc.. I was hoping to just be able to somehow connect with combination of IP Address with ABCLACSQLC123\DEV04A – Tom Stickel Feb 25 '15 at 08:44
  • Thanks for the negative vote - it just makes people not want to ask any questions. Thanks for your help Just pure awesome. – Tom Stickel Mar 03 '15 at 19:53
  • There, I think this is a valuable question. The answers would helps others to understand how Authentication mechanisms in SQL Server works. – Amir Keibi Mar 03 '15 at 20:50

4 Answers4

1

In order to use Windows Authentication, you'd have to add the credentials you use to login to the laptop as a "Login" to the SQL Server. That can only be done if

  1. You login to your laptop with a domain user and
  2. The user is in the same domain in which your SQL Server instance resides

Otherwise, you have no choice but to use SQL Server Authentication.

In this case, you login to your laptop with a user in "Corp" domain, but SQL Server instance is in "Services" domain. So it won't work. Unless I think both domains are part of the same Forest.

Amir Keibi
  • 1,991
  • 28
  • 45
0

Look at this answer : https://stackoverflow.com/a/1615431/3317709. There is no trick to login, unless you get rid of the "Network related..." error. If you are getting this error, SSMS is not even able to find your server let alone logging into it. Once you get "Login failed..." error, from that point, we can tinker and try to get thru using your windows auth.

Community
  • 1
  • 1
Ravi M Patel
  • 2,905
  • 2
  • 23
  • 32
0

Try creating a shortcut to runas.exe, pointing to SSMS.

C:\Windows\System32\runas.exe /netonly /user:myspecialaccount\firstname.lastname "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

(The path to your SSMS exe may vary.)

When you double-click the shortcut, this will open up SSMS. You should then be able to connect to your instance (ABCLACSQLC123\DEV04A) as if it were on your local machine.

See here for more info on the runas command: https://technet.microsoft.com/en-us/library/cc771525.aspx

phillyflats
  • 113
  • 5
  • This won't work if his account in another domain isn't visible to his laptop. If I understand correctly, that seems to be the case. He's using the special account with Remote Desktop. – Amir Keibi Mar 03 '15 at 20:55
0

Install SQL Server Management Studio Express on your laptop. Microsoft has made the download link obscenely hard to find on their own site, but I did manage to find it here. Download the one for your system, probably x64.

Installation isn't much easier. Once everything is extracted, run the program, and switch to the installation tab, and choose "Standalone installation or add new features". Continue along the installation, and just install the management tools.

Once installed and running, use the Connect to Server dialog (it should open when you start the program, but if it doesn't, it's the first option under the File tab), and target wherever you want to connect (IP or server name should both work). If your laptop also authenticates to the same server that handles Windows authentication for your database, you can use Windows authentication, otherwise, you'll have to create a SQL Server account to use for login.

Image depicting the Connect to Server dialog in SQL Server Management Studio

mdhansen
  • 384
  • 3
  • 16