SQL Server windows authentication - how to use an application account for login? RRS feed

  • Question

  • I am using VS 2015 (VB.NET) connecting to SQL Server 2014

    How do I use an account other than current windows user for accessing the SQL Server database? e.g. with my windows forms application, I would like to use a specific account to log into the SQL Server via windows authentication (an account other than the clients windows login).

    Thank you. 

    Friday, April 28, 2017 4:30 PM

All replies

  • It would be called using a generic user-id and password set up on Sql Server for the purpose of your program using the generic account to login into SQL Server. The password should be encrypted in the connectionstring.

    You best post to the SQL Server forum on how to do this.

    Friday, April 28, 2017 8:37 PM
  • You would need to use SQL Server Authentication instead of Windows Authentication. See the Standard Security section at the below link:

    Note that you will need to enable Mixed Mode authentication in SQL Server if you have not already done so.

    If your environment is limited to Windows Authentication then you must configure your application to run under the other account rather than default to the account of the user that is logged into the domain under Windows.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Monday, May 1, 2017 12:35 PM
  • Hi kingelk,

    To access a SQL database across the internet, you may need to use a connection string.

    Data Source=,1433;Network Library=DBMSSOCN;
    Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

    Data Source: you can use either the IP or DNS name.

    Initial Catalog: Database name on the SQL server.

    ID: SQL user name and password. This will use SQL authentication, not integrated windows security.

    Password: Password for the respective user ID.

    Hope it is helpful to you.

    Best Regards,

    Cherry Bu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, May 4, 2017 2:33 AM