How can access SQL Server by same windows user account from multiple Machine

  • Prakash T

    SSC Enthusiast

    Points: 128

    I have a scenario, Need to create windows based authentication in SQL Server, but applications are running different PCs accessing the same SQL server, is it possible to Access the SQL server from Different machine using same window Account.

  • John Mitchell-245523

    SSC Guru

    Points: 148777

    Yes, you can do that.

    John

  • Andrey

    Right there with Babe

    Points: 724

    "is it possible to Access the SQL server from Different machine using same window Account."

    It is possible if your applications run under the same AD account ("window Account") and use windows authentication connecting to the SQL server.

  • Prakash T

    SSC Enthusiast

    Points: 128

    Actually SQL Server Account is windows based authentication and we have created a Service account using AD and now we want to allow the application need to connect the Server via single service account across the Organisation. here each machine have separate AD accounts but connect to SQL server is a windows Account. How can we achieve this.

  • John Mitchell-245523

    SSC Guru

    Points: 148777

    (1) Grant the service account the necessary database access on the server

    (2) Configure the application on each PC to run under the service account

    John

  • Prakash T

    SSC Enthusiast

    Points: 128

    Hi John,

    I have did the same thing but while trying to connect SQL server its giving error, could u please advise how can we set the Application should run using windows service account. here i am using .net windows forms application and same application deployed across the multiple systems and they are connecting using same windows service account. when i enable the Integrated Security=TRUE it uses local/logged in user account for authentication then it got failed because local user doesn't have permission to access the SQL server

    It is only SQL server service Account and server authentication mechanism is only windows based.

     

     

     

  • Thom A

    SSC Guru

    Points: 98776

    If you want to use a single account, you need to have your .net application use impersonation, so that it connects using an impersonated windows account.

    Otherwise you could create a Login (and user) for an AD group and add your AD users to that AD group. Then the users would be able to connect to SQL server using their credentials, without having to give each them their own logins.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.

  • Andrey

    Right there with Babe

    Points: 724

    Prakash T wrote:

    I have did the same thing but while trying to connect SQL server its giving error  

    If you share the error text or error picture, it will be easier to help you.

    Otherwise, it's a guess game.

     

  • Prakash T

    SSC Enthusiast

    Points: 128

    Please find the attached Screen shots

    Attachments:
    You must be logged in to view attached files.
  • John Mitchell-245523

    SSC Guru

    Points: 148777

    OK, please post the login failure message(s) from the errorlog, and the result of this query:

    SELECT type
    FROM sys.server_principals
    WHERE name = 'SVCINFODEVEL'

    John

  • Andrey

    Right there with Babe

    Points: 724

    Prakash T wrote:

    Please find the attached Screen shots

     

    On the pics attached usernames are different - ServiceAC vs SVCINFODEVEL.

    Are there any logical links between them?

     

     

  • Thom A

    SSC Guru

    Points: 98776

    Prakash T wrote:

    Please find the attached Screen shots

    Those screenshots aren't Windows Authentication logins; they're SQL logins. If you're using SQL logins, who is running the application doesn't matter, as the AD credentials aren't use.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.

  • Andrey

    Right there with Babe

    Points: 724

    Thom A wrote:

    Prakash T wrote:

    Please find the attached Screen shots

    Those screenshots aren't Windows Authentication logins; they're SQL logins. If you're using SQL logins, who is running the application doesn't matter, as the AD credentials aren't use.

    I saw many times when users used AD accounts without domain and passwords trying to connect to  SQL server.

    So, it can be the similar case.

     

  • Thom A

    SSC Guru

    Points: 98776

    Andrey wrote:

    I saw many times when users used AD accounts without domain and passwords trying to connect to  SQL server. So, it can be the similar case.  

    This isn't the case here; the OP is clearly using SQL Server Authentication. You don't select "SQL Server Authentication" and enter a username and password using use AD authentication...

    Capture_error1[1]

    • This reply was modified 1 year, 3 months ago by  Thom A.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.

  • Andrey

    Right there with Babe

    Points: 724

    Thom A wrote:

    Andrey wrote:

    I saw many times when users used AD accounts without domain and passwords trying to connect to  SQL server. So, it can be the similar case.  

    This isn't the case here; the OP is clearly using SQL Server Authentication. You don't select "SQL Server Authentication" and enter a username and password using use AD authentication...

    I don't select, you don't select, but life is diverse and there are deviations.

    Let's see what the author will say.

Viewing 15 posts - 1 through 15 (of 18 total)

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