execute  a script with certain windows crendentials

Posted on 2012-09-14
Last Modified: 2012-09-17
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

Question by:isonali
    LVL 12

    Accepted 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.

    Author Comment

    Thank you so much. Looks like my issue is resolved

    Author Closing Comment

    Thank you

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now