behzad razzaqi
behzad razzaqi

Reputation: 275

How to connect to a remote SQL Server in my SSMS with Windows authentication?

I'm new to SQL Server, I install SQL Server in my local network PC and on my PC I want to connect to that SQL Server with Windows authentication. For that purpose I click browse for more option and click network server and wait to show that SQL Server, show that and try to connect but show me this error message:

enter image description here

What is happening? I tried to find that problem solution in google but I can't understand any solution, thanks.

Upvotes: 1

Views: 5623

Answers (2)

Thom Smith
Thom Smith

Reputation: 16

Use runas from the command line. Your command would look something like:

runas /netonly /user:WIN2012-SERVER\<username> "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe"

Swap <username> with your username on the server, you'll then be prompted for your server user password. This will launch SSMS where you can use windows authentication to connect to you server.

Save this as a batch file on your desktop to always launch SSMS with correct set of credentials.

Upvotes: 0

M.Hassan
M.Hassan

Reputation: 11032

You can connect to SQl server using Window Authentication in two cases:

  • The server and the client are in the same machine.

  • In Active Directory Environment , your pc is a member of the Domain controller(DC), you have access permission in the DC and that window login is authorized in SQL Server with permissions.

So, in your case, the only way to connect to sql server is using SQL Authenticated.

Create login account in the server with the permission needed and use that login to login to SQL server.

To use Sql Authentication, the server should be installed to support both modes (window authentication and sql authentication)

Upvotes: 1

Related Questions