Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

execute a script with certain windows crendentials

Can someone please advise how a a connection string can be passed to a python script to
connect to sql server with a certain windows service credentials.

I used the below connection string but it takes windows credentials of the machine
i am connected to not the one i passed in the connection string

Sonali P
Sonali P
  • 2
1 Solution
The above string will only connect to a sql database using a login/password for a user who connects with sql server authentication.

That user will have specific rights on the SQL Server, but is not necessarily a Windows user.

This link has a working example of how to impersonate a Windows user with Python.

Sonali PDatabase AdministratorAuthor Commented:
Thank you so much. Looks like my issue is resolved
Sonali PDatabase AdministratorAuthor Commented:
Thank you

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now